tgadmin/docker-compose.yml
2024-07-29 14:23:51 +03:00

55 lines
1.1 KiB
YAML

services:
postgres:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: ${DB_LOG}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
volumes:
- postgres-data:/var/lib/postgresql/data
- ./files/postgresql.conf:/etc/postgresql/postgresql.conf
- ./files/pg_hba.conf:/etc/postgresql/pg_hba.conf
ports:
- "5431:5432"
bot:
build:
context: .
dockerfile: Dockerfile
restart: always
command: ["python", "-u", "bot"]
depends_on:
- postgres
volumes:
- .:/app
- ./logs:/app/logs
site:
build:
context: .
dockerfile: Dockerfile
restart: always
command: ["python", "-u", "webadmin"]
depends_on:
- postgres
ports:
- "8004:8004" # Проброс порта 8080 на хосте
volumes:
- .:/app
- ./logs:/app/logs
nginx:
image: nginx:latest
restart: always
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- site
volumes:
postgres-data: