backend/docker-compose.yml

42 lines
901 B
YAML
Raw Normal View History

2022-08-27 19:20:20 +03:00
version: "3.9"
2022-08-26 17:00:34 +03:00
services:
2022-08-27 19:20:20 +03:00
web:
build: .
ports:
- "8000:8000"
volumes:
- .:/code
command: >
sh -c "python3 manage.py makemigrations &&
python3 manage.py migrate --noinput &&
python3 manage.py loaddata paragraphtypes.json &&
python3 manage.py runserver 0.0.0.0:8000"
depends_on:
- db
db:
image: postgres:14-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
2022-08-26 17:00:34 +03:00
ports:
- "5432:5432"
2022-08-27 19:20:20 +03:00
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
- "POSTGRES_DB=db"
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=postgres"
2022-08-26 20:04:45 +03:00
redis:
2022-08-27 19:20:20 +03:00
image: redis:alpine
celery:
restart: always
build:
context: .
command: celery -A conf worker --loglevel=INFO
volumes:
- ./app:/app
depends_on:
- db
- redis
- web
volumes:
postgres_data: