feat(docker): add admin-backend service to docker-compose.local.yml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
zheng020 2026-04-08 00:25:16 +08:00
parent 23fd7de096
commit 4e007fe84d

View File

@ -235,6 +235,40 @@ services:
reservations:
memory: 256M
# ==================== Admin Backend ====================
admin-backend:
image: topfans/admin-backend:latest
build:
context: ../../TopFans-activity
dockerfile: docker/Dockerfile.admin
container_name: topfans-admin-backend
restart: unless-stopped
environment:
<<: *common-env
DB_HOST: host.docker.internal
DB_PORT: 15432
DB_USER: postgres
DB_PASSWORD: ${DB_PASSWORD:-123456}
DB_NAME: ${DB_NAME:-top-fans}
networks:
- topfans-net
ports:
- "8081:8081"
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 8081 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
networks:
topfans-net:
driver: bridge