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.
58 lines
1.3 KiB
58 lines
1.3 KiB
version: '3'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:10-alpine
|
|
environment:
|
|
- LANG=ru_RU.UTF-8
|
|
- POSTGRES_DB=lilcity
|
|
- POSTGRES_USER=lilcity
|
|
- POSTGRES_PASSWORD=GPVs/E/{5&qe
|
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
redis:
|
|
image: redis:latest
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- ./redis_data:/data
|
|
|
|
web:
|
|
build: .
|
|
restart: always
|
|
volumes:
|
|
- .:/lilcity
|
|
command: bash -c "python manage.py collectstatic --no-input && python manage.py migrate && python manage.py loaddata /lilcity/apps/*/fixtures/*.json && gunicorn --workers=4 project.wsgi --bind=0.0.0.0:8000 --worker-class=gthread --reload"
|
|
environment:
|
|
- DJANGO_SETTINGS_MODULE=project.settings
|
|
- DATABASE_SERVICE_HOST=db
|
|
- REDIS_SERVICE_HOST=redis
|
|
ports:
|
|
- "${PORT}:8000"
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
links:
|
|
- db
|
|
- redis
|
|
|
|
workers:
|
|
build: .
|
|
restart: always
|
|
volumes:
|
|
- .:/lilcity
|
|
command: bash -c "celery worker -A project -B"
|
|
environment:
|
|
- DJANGO_SETTINGS_MODULE=project.settings
|
|
- DATABASE_SERVICE_HOST=db
|
|
- REDIS_SERVICE_HOST=redis
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
- web
|
|
links:
|
|
- db
|
|
- redis
|
|
- web
|
|
|