Files
notification/docker-compose.yml

97 lines
2.2 KiB
YAML

networks:
lamenu:
driver: bridge
volumes:
pg_data: null
pycache: null
services:
traefik:
image: traefik:v2.10
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--providers.docker.exposedbydefault=false"
ports:
- "80:80"
- "8080:8080" # Dashboard uchun
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- lamenu
auth-nginx:
labels:
- "traefik.enable=true"
- "traefik.http.routers.auth.rule=PathPrefix(`/auth`)"
- "traefik.http.routers.auth.entrypoints=web"
- "traefik.http.services.auth.loadbalancer.server.port=80"
- "traefik.http.middlewares.auth-strip-prefix.stripPrefix.prefixes=/auth"
- "traefik.http.routers.auth.middlewares=auth-strip-prefix"
networks:
- lamenu
volumes:
- ./services/auth/resources/layout/nginx.conf:/etc/nginx/nginx.conf
- ./services/auth/resources/:/usr/share/nginx/html/resources/
build:
context: ./services/auth
dockerfile: ./docker/Dockerfile.nginx
depends_on:
- auth
profiles:
- auth
auth:
networks:
- lamenu
build:
context: ./services/auth
dockerfile: ./docker/Dockerfile.web
restart: always
command: ${AUTH_COMMAND:-sh ./resources/scripts/entrypoint.sh}
environment:
- PYTHONPYCACHEPREFIX=/var/cache/pycache
- JWT_KEY=${JWT_KEY}
volumes:
- ./services/auth:/code
- pycache:/var/cache/pycache
depends_on:
- auth-db
- redis
profiles:
- auth
auth-db:
networks:
- lamenu
image: postgres:16
restart: always
environment:
POSTGRES_DB: django
POSTGRES_USER: postgres
POSTGRES_PASSWORD: '2309'
volumes:
- pg_data:/var/lib/postgresql/data
profiles:
- auth
payment:
networks:
- lamenu
build:
context: ./services/payment
dockerfile: ./Dockerfile
restart: always
environment:
- JWT_KEY=${JWT_KEY}
volumes:
- ./services/payment:/code
- pycache:/var/cache/pycache
profiles:
- payment
redis:
networks:
- lamenu
restart: always
image: redis