You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
60 lines
1.2 KiB
version: '3'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:alpine
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "127.0.0.1:5432:5432"
|
|
volumes:
|
|
- ./data/postgres_dev:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:6379:6379"
|
|
volumes:
|
|
- ./data/redis_dev:/data
|
|
|
|
web:
|
|
build:
|
|
context: ../
|
|
dockerfile: docker/Dockerfile.dev
|
|
restart: always
|
|
volumes:
|
|
- .:/lilcity
|
|
- ./data/media_dev:/app/media
|
|
command: bash -c "python manage.py collectstatic --no-input && python manage.py migrate && gunicorn --workers=4 project.wsgi --bind=0.0.0.0:8000 --worker-class=gthread --reload"
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "127.0.0.1:${PORT}:8000"
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
links:
|
|
- db
|
|
- redis
|
|
|
|
workers:
|
|
build:
|
|
context: ../
|
|
dockerfile: docker/Dockerfile.dev
|
|
restart: always
|
|
volumes:
|
|
- .:/lilcity
|
|
- ./data/media_dev:/app/media
|
|
command: bash -c "celery worker -A project -B"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
- web
|
|
links:
|
|
- db
|
|
- redis
|
|
- web
|
|
|