Files
online-backend/docker-compose.yaml
GuwandykA e5f01d0e94
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled
add docker
2026-10-23 00:39:04 +05:00

72 lines
1.7 KiB
YAML
Executable File

services:
main-db:
# Keep in sync with the runtime stage in Dockerfile: pg_dump must match this major version.
image: postgres:14.1-alpine
container_name: "main-db"
restart: always
environment:
- POSTGRES_USER=bank_admin
- POSTGRES_PASSWORD=bank@#23#@_password
- POSTGRES_DB=bank_db
ports:
- '5424:5432'
volumes:
- main-db-storage:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U bank_admin -d bank_db"]
interval: 5s
timeout: 5s
retries: 20
networks:
- myNetwork
main-server:
image: main-app:latest
restart: unless-stopped
container_name: "main-app"
build:
context: .
dockerfile: Dockerfile
environment:
- TZ=Asia/Ashgabat
ports:
- "5050:5050"
volumes:
# Inside this network the config must point at main-db:5432 and main-minio:9000.
- ./config.yaml:/app/config.yaml:ro
- ./public:/app/public
- ./logs:/app/logs
depends_on:
main-db:
condition: service_healthy
main-minio:
condition: service_started
networks:
- myNetwork
main-minio:
image: main-minio:latest
container_name: "main-minio"
build:
context: ./deployment
dockerfile: Dockerfile.minio
restart: unless-stopped
environment:
- MINIO_ROOT_USER=TX3H1H6XTS288QW07S8Z
- MINIO_ROOT_PASSWORD=FWWspiI4n4LMknnxYCmzFTCY1ObkGiuaU9SNwOCU
ports:
- '127.0.0.1:9003:9000'
- '127.0.0.1:9093:9093'
volumes:
- main-minio-storage:/storage
networks:
- myNetwork
volumes:
main-db-storage:
main-minio-storage:
networks:
myNetwork:
driver: bridge