add bb_api rest api for begushiybashkir

This commit is contained in:
2025-10-07 05:23:40 +05:00
parent de0c992db9
commit 23d68e53ab
16 changed files with 552 additions and 1 deletions
+51 -1
View File
@@ -81,17 +81,64 @@ services:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
networks:
- app-network
- bb-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 5
api_db:
build:
context: ./api_bb
dockerfile: Dockerfile
ports:
- "7777:8080"
container_name: api_bb
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
# Database connection settings
DB_HOST: db
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: mydb
APP_PORT: 8080
networks:
- bb-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
bb_db:
image: postgres:15-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mydb
volumes:
- bb_data:/var/lib/postgresql/data
networks:
- bb_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 5
volumes:
certbot_data:
certbot_www:
postgres_data:
bb_data;
networks:
web-network:
@@ -100,3 +147,6 @@ networks:
driver: bridge
app-network:
name: serv_golang_rest_api_app-network
bb_network:
name: begushiy_bashkir_api_network