Files
api-golang/docker-compose.yml
Flavio Fois 6c8b400a4a add docker configuration and gitea workflow for automated image builds
Introduce a multi-stage Dockerfile, docker-compose setup, and a Gitea Actions workflow to automate building and pushing images to the registry. The configuration includes an entrypoint script for persistent logging and a .dockerignore to optimize the build context.
2026-03-23 11:09:25 +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: