Files
api-golang/docker-compose.yml
Flavio Fois e7678bc1d4
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m10s
update docker-compose to build API service locally
Switch from using a pre-built remote image to building the API service from the local Dockerfile.
2026-03-23 21:45:24 +01:00

26 lines
563 B
YAML

services:
api:
build: .
restart: unless-stopped
ports:
- "${PORT:-8080}:8080"
environment:
PORT: ${PORT:-8080}
DB_DSN: ${DB_DSN}
DATABASE_NAME: ${DATABASE_NAME}
API_KEY: ${API_KEY}
ADMIN_KEY: ${ADMIN_KEY}
DB_MAX_OPEN_CONNS: ${DB_MAX_OPEN_CONNS:-25}
DB_MAX_IDLE_CONNS: ${DB_MAX_IDLE_CONNS:-5}
DB_CONN_MAX_LIFETIME: ${DB_CONN_MAX_LIFETIME:-5}
volumes:
- logs:/logs
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
volumes:
logs: