version: "3.8"
name: sdbapi
networks:
internal:
external: false
volumes:
apidb_data:
driver: local
services:
sdbapidb:
image: postgres:15.1-alpine
container_name: sdbapidb
restart: always
networks:
- internal
volumes:
- apidb_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: sdbapi
POSTGRES_PASSWORD: sdbapi
POSTGRES_DB: sdbapi
sdbapi:
build: .
image: sdbapi
container_name: sdbapi
restart: always
networks:
- internal
ports:
- "8080:3000"
environment:
GIN_MODE: "release" # or "debug" for debug logs
SDBAPI_JWT_SECRET: "XpNYdG7vgvgPPuezrtZqt4CJIUuxNP7c"
GORM_DB_STRING: "host=sdbapidb user=sdbapi password=sdbapi dbname=sdbapi port=5432 sslmode=disable"
depends_on:
- sdbapidb