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 volumes: postgres-data: