mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:55:42 +00:00
JVM attach (used by jcmd) communicates via socket files in /tmp. With shared PID namespace but separate filesystems, the sidecar couldn't find Eagle's .java_pid1 socket file. Add a shared named volume for /tmp between both containers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
150 lines
4.1 KiB
YAML
150 lines
4.1 KiB
YAML
# Docker Compose for production deployment
|
|
#
|
|
# Local testing:
|
|
# Build images: bazel run //ci:eagle_server_load && bazel run //ci:shardok_server_load
|
|
# Run: docker compose -f docker-compose.prod.yml up
|
|
#
|
|
# Production deployment:
|
|
# Run: docker compose -f docker-compose.prod.yml up -d
|
|
|
|
services:
|
|
eagle:
|
|
image: ${EAGLE_IMAGE:-registry.digitalocean.com/eagle0/eagle-server:latest}
|
|
container_name: eagle-server
|
|
command:
|
|
- "--gpt-model-name"
|
|
- "${GPT_MODEL_NAME:-gpt-5.1}"
|
|
- "--shardok-interface-remote-address"
|
|
- "shardok:40042"
|
|
ports:
|
|
- "40032:40032"
|
|
environment:
|
|
OPENAI_API_KEY: "${OPENAI_API_KEY:-}"
|
|
EAGLE_ENABLE_S3: "${EAGLE_ENABLE_S3:-false}"
|
|
DO_SPACES_ENDPOINT: "${DO_SPACES_ENDPOINT:-https://sfo3.digitaloceanspaces.com}"
|
|
DO_SPACES_ACCESS_KEY: "${DO_SPACES_ACCESS_KEY:-}"
|
|
DO_SPACES_SECRET_KEY: "${DO_SPACES_SECRET_KEY:-}"
|
|
volumes:
|
|
- ./saves:/app/saves
|
|
- ./jfr:/app/jfr # JFR recordings - dump with: docker exec eagle-server jcmd 1 JFR.dump filename=/app/jfr/profile.jfr
|
|
- jvm-tmp:/tmp # Shared with jfr-sidecar for JVM attach socket files
|
|
depends_on:
|
|
- shardok
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "5"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "nc -z localhost 40032 || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
shardok:
|
|
image: ${SHARDOK_IMAGE:-registry.digitalocean.com/eagle0/shardok-server:latest}
|
|
container_name: shardok-server
|
|
ports:
|
|
- "40042:40042"
|
|
- "40052:40052"
|
|
environment:
|
|
SHARDOK_RESOURCES_PATH: "/app/resources"
|
|
SHARDOK_MAPS_PATH: "/app/resources/maps"
|
|
SHARDOK_EAGLE_INTERFACE_ADDRESS: "0.0.0.0:40042"
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "5"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "nc -z localhost 40042 || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: nginx
|
|
ports:
|
|
- "443:443"
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./certbot/conf:/etc/letsencrypt:ro
|
|
- ./certbot/www:/var/www/certbot:ro
|
|
- ./auth:/etc/nginx/auth:ro
|
|
depends_on:
|
|
- eagle
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "3"
|
|
|
|
admin:
|
|
image: ${ADMIN_IMAGE:-registry.digitalocean.com/eagle0/admin-server:latest}
|
|
container_name: admin-server
|
|
command:
|
|
- "--eagle-addr"
|
|
- "eagle:40032"
|
|
- "--jfr-sidecar-addr"
|
|
- "jfr-sidecar:8081"
|
|
- "--http-port"
|
|
- "8080"
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
- eagle
|
|
- jfr-sidecar
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "3"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q --spider http://localhost:8080/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
jfr-sidecar:
|
|
image: ${JFR_SIDECAR_IMAGE:-registry.digitalocean.com/eagle0/jfr-sidecar:latest}
|
|
container_name: jfr-sidecar
|
|
# Share PID namespace with Eagle to access its JVM via jcmd
|
|
pid: "service:eagle"
|
|
volumes:
|
|
- jvm-tmp:/tmp # Shared with Eagle for JVM attach socket files
|
|
depends_on:
|
|
- eagle
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "2"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q --spider http://localhost:8081/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
certbot:
|
|
image: certbot/certbot
|
|
container_name: certbot
|
|
volumes:
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
- ./certbot/www:/var/www/certbot
|
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
|
|
|
volumes:
|
|
jvm-tmp:
|
|
# Shared /tmp for JVM attach socket files between Eagle and jfr-sidecar
|