production_postgres_data: {}
production_postgres_data_backups: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: meditation_production_django
depends_on:
- postgres
- redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: meditation_production_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
env_file:
- ./.envs/.production/.postgres
traefik:
build:
context: .
dockerfile: ./compose/production/traefik/Dockerfile
image: meditation_production_traefik
depends_on:
- django
ports:
- "0.0.0.0:80:80"
redis:
image: redis:5.0
celeryworker:
<<: *django
image: meditation_production_celeryworker
command: /start-celeryworker
celerybeat:
<<: *django
image: meditation_production_celerybeat
command: /start-celerybeat
Почему ты не используешь провайдер докера и не разруливаешь все через него ?
whoami2: image: containous/whoami labels: - traefik.http.routers.whoami2.rule=host(`whoami2.local`) - traefik.http.services.whoami2.loadbalancer.server.port=50051 traefik: image: traefik restart: always network_mode: host image: traefik command: > --api.insecure=true --providers.docker=true --accesslog --log.level=debug --providers.docker.watch --metrics.prometheus=true --serverstransport.insecureskipverify --entrypoints.web.address=":80" --entrypoints.websecure.address=":443" volumes: - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events ports: - 880:80 - 8180:8080 - 4443:443
Обсуждают сегодня