Integrate admin platform into Docker Compose stack

- Add admin service to docker-compose.yaml and docker-compose-template.yaml
  - Uses akiyu303/jim-admin:latest image
  - Configurable API URL via ADMIN_API_URL env var (defaults to https://qingsu.chat)
  - Includes health check on /admin endpoint

- Update nginx configuration to route /admin to admin container
  - Changed from host.docker.internal:3000 to admin:3000
  - Admin service now runs within Docker network

- Add admin service as nginx dependency to ensure proper startup order

This allows the admin platform to run as part of the complete jim-dify stack
instead of requiring a separate local development server.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
pull/21891/head
ytqh 11 months ago
parent 03155f658d
commit 42b7ec95bf

@ -115,6 +115,20 @@ services:
ENABLE_WEBSITE_JINAREADER: ${ENABLE_WEBSITE_JINAREADER:-true}
ENABLE_WEBSITE_FIRECRAWL: ${ENABLE_WEBSITE_FIRECRAWL:-true}
ENABLE_WEBSITE_WATERCRAWL: ${ENABLE_WEBSITE_WATERCRAWL:-true}
# Admin platform frontend
admin:
image: akiyu303/jim-admin:latest
restart: always
environment:
NEXT_PUBLIC_API_URL: ${ADMIN_API_URL:-https://qingsu.chat}
depends_on:
- api
healthcheck:
test: [ 'CMD', 'curl', '-f', 'http://localhost:3000/admin' ]
interval: 30s
timeout: 10s
retries: 3
# The postgres database.
db:
image: postgres:15-alpine
@ -308,6 +322,7 @@ services:
depends_on:
- api
- web
- admin
ports:
- '${EXPOSE_NGINX_PORT:-80}:${NGINX_PORT:-80}'
- '${EXPOSE_NGINX_SSL_PORT:-443}:${NGINX_SSL_PORT:-443}'

@ -627,6 +627,20 @@ services:
ENABLE_WEBSITE_JINAREADER: ${ENABLE_WEBSITE_JINAREADER:-true}
ENABLE_WEBSITE_FIRECRAWL: ${ENABLE_WEBSITE_FIRECRAWL:-true}
ENABLE_WEBSITE_WATERCRAWL: ${ENABLE_WEBSITE_WATERCRAWL:-true}
# Admin platform frontend
admin:
image: akiyu303/jim-admin:latest
restart: always
environment:
NEXT_PUBLIC_API_URL: ${ADMIN_API_URL:-https://qingsu.chat}
depends_on:
- api
healthcheck:
test: [ 'CMD', 'curl', '-f', 'http://localhost:3000/admin' ]
interval: 30s
timeout: 10s
retries: 3
# The postgres database.
db:
image: postgres:15-alpine
@ -820,6 +834,7 @@ services:
depends_on:
- api
- web
- admin
ports:
- '${EXPOSE_NGINX_PORT:-80}:${NGINX_PORT:-80}'
- '${EXPOSE_NGINX_SSL_PORT:-443}:${NGINX_SSL_PORT:-443}'

@ -46,7 +46,7 @@ server {
}
location /admin {
proxy_pass http://host.docker.internal:3000;
proxy_pass http://admin:3000;
include proxy.conf;
}

Loading…
Cancel
Save