Skip to content
Snippets Groups Projects
Commit d84147cd8b27 authored by Fabien Amarger's avatar Fabien Amarger
Browse files

feat: Add docker-compose to dev locally with all services included

parent fe0531635365
No related branches found
No related tags found
1 merge request!7Topic/default/docker compose
FROM logilab/cubicweb-base:latest FROM logilab/cubicweb-base:cw4-postgres16-bullseye
USER root
COPY --chown=cubicweb . /src COPY setup.py MANIFEST.in README.rst /src/
# If you pinned dependencies in a file (requirements.txt), add it here with RUN mkdir /src/cubicweb_rodolf
# -r /src/requirements.txt COPY cubicweb_rodolf/ /src/cubicweb_rodolf
RUN pip install -e /src RUN pip install -e /src
...@@ -6,4 +6,3 @@ ...@@ -6,4 +6,3 @@
RUN pip install -e /src RUN pip install -e /src
USER cubicweb USER cubicweb
RUN docker-cubicweb-helper create-instance RUN docker-cubicweb-helper create-instance
services:
rodolf:
build: .
ports:
- "8080:8080"
environment:
CW_DB_HOST: db
CW_DB_PORT: 5432
CW_DB_NAME: rodolf
CW_DB_USER: rodolf
CW_DB_PASSWORD: rodolf
REDIS_SESSIONS_URL: redis://redis:6379
REDIS_SESSIONS_SECRET: loutre
DEBUG: 1
depends_on:
redis:
condition: service_started
db:
condition: service_healthy
minio:
condition: service_started
networks:
- backend
volumes:
- ./docker-data/config/:/etc/cubicweb.d/instance/
- .:/src/
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- ./docker-data/minio_storage:/data
environment:
MINIO_ROOT_USER: test
MINIO_ROOT_PASSWORD: test1234
command: server --console-address ":9001" /data
networks:
- backend
db:
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: rodolf
POSTGRES_PASSWORD: rodolf
POSTGRES_DB: rodolf
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 1s
timeout: 5s
retries: 10
volumes:
- ./docker-data/postgres/db:/var/lib/postgresql/data
networks:
- backend
redis:
image: redis:bookworm
networks:
- backend
networks:
backend:
driver: bridge
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment