Skip to content
Snippets Groups Projects
Commit c3fc917b authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Refactor docker-compose to use background workers

parent c474d218
No related branches found
No related tags found
2 merge requests!8update dev-nico to make small changes,!7Add script csv gen
Pipeline #34326 failed
...@@ -25,12 +25,33 @@ services: ...@@ -25,12 +25,33 @@ services:
- ldv-spec-db:/var/lib/postgresql/data - ldv-spec-db:/var/lib/postgresql/data
restart: always restart: always
rabbitmq:
image: rabbitmq:3-management
networks:
- ldv_network
container_name: ldv-spec-rabbit
ldv-specification-background:
container_name: ldv-specification-background
image: git.astron.nl:5000/astron-sdc/ldv-specification:${LDVSPEC_VERSION:-latest}
networks:
- ldv_network
depends_on:
- ldv-spec-db
environment:
CELERY_BROKER_URL: amqp://guest@rabbitmq:5672
DJANGO_SETTINGS_MODULE: 'ldvspec.settings.docker_sdc'
env_file:
- $HOME/shared/ldvspec.env
command: celery -A ldvspec worker -l INFO
restart: always
ldv-specification: ldv-specification:
container_name: ldv-specification container_name: ldv-specification
image: git.astron.nl:5000/astron-sdc/ldv-specification:latest image: git.astron.nl:5000/astron-sdc/ldv-specification:${LDVSPEC_VERSION:-latest}
expose: ports:
- "8000" - "8000:8000"
networks: networks:
- traefik_proxy - traefik_proxy
- ldv_network - ldv_network
...@@ -43,11 +64,10 @@ services: ...@@ -43,11 +64,10 @@ services:
depends_on: depends_on:
- ldv-spec-db - ldv-spec-db
environment:
CELERY_BROKER_URL: amqp://guest@rabbitmq:5672
env_file: env_file:
- $HOME/shared/ldvspec.env - $HOME/shared/ldvspec.env
# command: >
# sh -c "python manage.py collectstatic --settings=ldvspec.settings.docker_sdc --noinput &&
# python manage.py migrate --settings=ldvspec.settings.docker_sdc"
restart: always restart: always
volumes: volumes:
......
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