Feat: started CI/CD work

This commit is contained in:
2024-12-27 01:38:50 +03:00
parent 53bb09f41c
commit 3472c3fd71
5 changed files with 66 additions and 6 deletions

View File

@@ -1,10 +1,42 @@
services:
bot:
image: aboba:latest
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- bot_network
depends_on:
db:
condition: service_healthy
db:
image: postgres:alpine
restart: always
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
ports:
- ${POSTGRES_PORT}:5432
- 5432
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 10
networks:
- bot_network
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
bot_network:
driver: overlay
volumes:
postgres_data: