Files
anonymous_github/backend/compose.yml
T

41 lines
1.1 KiB
YAML

# Opt-in Go backend on the existing database network. Stop Node API and
# streamers before starting this service against the same database.
services:
go-backend:
image: anonymous-github-go:${GO_IMAGE_TAG:-local}
build:
context: ..
dockerfile: Dockerfile
init: true
restart: unless-stopped
stop_grace_period: 45s
env_file: ${GO_ENV_FILE:-../.env}
environment:
PORT: "5000"
REDIS_HOSTNAME: redis
DB_HOSTNAME: mongodb
COOKIE_SECURE: "true"
GOMEMLIMIT: 768MiB
ANONYMIZATION_MEMORY_MB: "512"
ports:
- "127.0.0.1:${GO_EXPOSED_PORT:-5001}:5000"
volumes:
- ../repositories:/app/repositories
read_only: true
tmpfs:
- /tmp:size=2147483648,mode=1777
mem_limit: 3g
pids_limit: 128
cap_drop: [ALL]
security_opt: [no-new-privileges:true]
networks: [existing]
logging:
driver: json-file
options:
max-size: "25m"
max-file: "4"
networks:
existing:
external: true
name: ${GO_BACKEND_NETWORK:?Set GO_BACKEND_NETWORK to the existing database network}