Add: basic docker-compose file for development

This commit is contained in:
Aroy-Art 2023-10-21 10:56:24 +02:00
parent 412bd9251b
commit 5360f16052
Signed by: Aroy
GPG key ID: DB9689E9391DD156
2 changed files with 62 additions and 44 deletions

62
docker-compose-dev.yml Normal file
View file

@ -0,0 +1,62 @@
version: "3.8"
services:
django:
build:
context: .
dockerfile: Dockerfile
args:
- USER_ID=1000
image: gallery-archivist:dev
#container_name: django
command: >
sh -c "cd archivist
&& python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app/
ports:
- "8000:8000"
environment:
#- DJANGO_SETTINGS_MODULE=core.settings.production
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] northpaw.aroy.hs.tun:8000
- CELERY_BROKER=redis://redis:6379/0
depends_on:
#- pgdb
- redis
celery-worker:
#build: .
image: gallery-archivist:dev
#container_name: celery_worker
command: >
sh -c "cd archivist
&& celery -A core worker -l INFO"
volumes:
- .:/app/
environment:
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
- CELERY_BROKER=redis://redis:6379/0
depends_on:
- django
- redis
celery-beat:
#build: .
image: gallery-archivist:dev
command: >
sh -c "cd archivist
&& celery -A core beat -l INFO"
volumes:
- .:/app/
environment:
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
- CELERY_BROKER=redis://redis:6379/0
depends_on:
- django
- redis
redis:
image: "redis:alpine"

View file

@ -1,44 +0,0 @@
version: "3.8"
services:
django:
build: .
container_name: django
command: python archivist/manage.py runserver 0.0.0.0:8000
volumes:
- .:/app/
ports:
- "8000:8000"
environment:
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
- CELERY_BROKER=redis://redis:6379/0
depends_on:
#- pgdb
- redis
celery-worker:
build: .
command: celery --workdir archivist/ -A core worker -l INFO
volumes:
- .:/app/
environment:
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
- CELERY_BROKER=redis://redis:6379/0
depends_on:
- django
- redis
celery-beat:
build: .
command: celery --workdir archivist/ -A core beat -l INFO
volumes:
- .:/app/
environment:
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
- CELERY_BROKER=redis://redis:6379/0
depends_on:
- django
- redis
redis:
image: "redis:alpine"