crawlerApp/docker-compose.yml

60 lines
1.2 KiB
YAML
Raw Normal View History

2022-02-20 18:11:15 +00:00
version: '3.7'
x-service-volumes: &service-volumes
- ./:/app/:rw,cached
- static:/app/static
x-database-variables: &database-variables
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
x-app-variables: &app-variables
<<: *database-variables
POSTGRES_HOST: postgres
DEBUG : 0
services:
crawlerApp:
image: crawlerapp:latest
# command: ["gunicorn", "--bind", ":8000","--error-logfile" ,"/var/log/gunicorn-error.log","--workers", "1", "crawlerApp.wsgi:application"]
# expose:
# - 8000
# #command: /env/bin/python /app/manage.py runserver 0.0.0.0:3000
volumes: *service-volumes
environment: *app-variables
depends_on:
- db_migrate
ports:
- "8000:8000"
db_migrate:
image: crawlerapp:latest
command: /env/bin/python /app/manage.py migrate
volumes: *service-volumes
environment: *app-variables
depends_on:
- postgres
nginx:
build : ./nginx
ports:
- '3000:3000'
volumes: *service-volumes
depends_on:
- crawlerApp
postgres:
image: postgres
ports:
- "5432:5432"
environment: *app-variables
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data:
static: