Files
creator-hub/compose.yaml
T

74 lines
1.9 KiB
YAML

services:
creator-hub:
build: .
environment:
DOCKER_GATEWAY_URL: http://docker-gateway:8081
DATABASE_URL: postgres://creatorhub@postgres/creatorhub?sslmode=disable
ports:
- "127.0.0.1:${CREATORHUB_PORT:-8080}:8080"
read_only: true
tmpfs:
- /tmp:size=16m,noexec,nosuid,nodev
cap_drop: [ALL]
security_opt: [no-new-privileges:true]
depends_on:
docker-gateway:
condition: service_healthy
postgres:
condition: service_healthy
networks: [control]
restart: unless-stopped
postgres:
image: postgres:17-alpine@sha256:18cfe3ef5e6815560c98237d6216d1e5119702fb0f3894c8785dd58b8bbe5d73
environment:
POSTGRES_DB: creatorhub
POSTGRES_USER: creatorhub
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: [CMD-SHELL, pg_isready -h 127.0.0.1 -U creatorhub -d creatorhub]
interval: 2s
timeout: 2s
retries: 15
volumes:
- creatorhub_postgres:/var/lib/postgresql/data
read_only: true
tmpfs:
- /run/postgresql:size=1m,nosuid,nodev
- /tmp:size=16m,nosuid,nodev
cap_drop: [ALL]
cap_add: [CHOWN, FOWNER, DAC_OVERRIDE, SETUID, SETGID]
security_opt: [no-new-privileges:true]
networks: [control]
restart: unless-stopped
docker-gateway:
build: .
command: ["/app/docker-gateway"]
environment:
BROWSER_NETWORK: creatorhub_browser
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
group_add:
- "${DOCKER_GID:-999}"
healthcheck:
test: [CMD, wget, -q, -O, /dev/null, http://127.0.0.1:8081/healthz]
interval: 2s
timeout: 2s
retries: 15
read_only: true
tmpfs:
- /tmp:size=16m,noexec,nosuid,nodev
cap_drop: [ALL]
security_opt: [no-new-privileges:true]
networks: [control]
restart: unless-stopped
networks:
control:
name: creatorhub_control
internal: true
volumes:
creatorhub_postgres: