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

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

View File

@ -298,6 +298,40 @@ services:
memory: 64M
cpus: '0.25'
# ==================== Admin Backend ====================
admin-backend:
image: topfans/admin-backend:latest
build:
context: ../../TopFans-activity
dockerfile: docker/Dockerfile.admin
container_name: topfans-admin-backend
restart: always
environment:
<<: *common-env
DB_HOST: postgres
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: ${DB_PASSWORD:-postgres123}
DB_NAME: topfans
depends_on:
postgres:
condition: service_healthy
networks:
- topfans-net
ports:
- "8081:8081"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8081/health || exit 1"]
<<: *healthcheck
deploy:
resources:
limits:
memory: 200M
cpus: '0.5'
reservations:
memory: 64M
cpus: '0.25'
networks:
topfans-net:
driver: bridge