- compose: 去掉 control 网络的 internal 标记(internal 网络上 Docker 会静默丢弃端口发布,导致局域网无法访问) - docker-gateway: 浏览器网络改为普通 bridge,移除 internal+禁 ICC - AGENTS.md: 新增开发阶段原则(仅业务功能、不做访问限制、安全自管),删除输入信任/风控/敏感日志约束 - docs/README: 同步移除 localhost-only 与网络隔离声明 - 端口改为 8082(8080 被 multica-backend-1 占用)
73 lines
1.9 KiB
YAML
73 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:
|
|
- "${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
|
|
|
|
volumes:
|
|
creatorhub_postgres:
|