86 lines
2.6 KiB
YAML
86 lines
2.6 KiB
YAML
name: scanopy
|
|
|
|
x-scanopy-env: &scanopy-env
|
|
SCANOPY_LOG_LEVEL: ${SCANOPY_LOG_LEVEL:-info}
|
|
SCANOPY_SERVER_PORT: ${SCANOPY_SERVER_PORT:-60072}
|
|
SCANOPY_DAEMON_PORT: ${SCANOPY_DAEMON_PORT:-60073}
|
|
|
|
services:
|
|
daemon:
|
|
image: ghcr.io/scanopy/scanopy/daemon:latest
|
|
container_name: scanopy-daemon
|
|
network_mode: host
|
|
privileged: true
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${SCANOPY_DAEMON_PORT:-60073}:${SCANOPY_DAEMON_PORT:-60073}"
|
|
environment:
|
|
<<: *scanopy-env
|
|
SCANOPY_SERVER_URL: ${SCANOPY_SERVER_URL:-http://127.0.0.1:60072}
|
|
SCANOPY_PORT: ${SCANOPY_DAEMON_PORT:-60073}
|
|
SCANOPY_BIND_ADDRESS: ${SCANOPY_BIND_ADDRESS:-0.0.0.0}
|
|
SCANOPY_NAME: ${SCANOPY_NAME:-scanopy-daemon}
|
|
SCANOPY_HEARTBEAT_INTERVAL: ${SCANOPY_HEARTBEAT_INTERVAL:-30}
|
|
SCANOPY_MODE: ${SCANOPY_MODE:-Push}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:${SCANOPY_DAEMON_PORT:-60073}/api/health || exit 1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 15
|
|
volumes:
|
|
- daemon-config:/root/.config/daemon
|
|
# Comment out the line below to disable docker discovery
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_DB: scanopy
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- scanopy
|
|
|
|
server:
|
|
image: ghcr.io/scanopy/scanopy/server:latest
|
|
ports:
|
|
- "${SCANOPY_SERVER_PORT:-60072}:${SCANOPY_SERVER_PORT:-60072}"
|
|
environment:
|
|
<<: *scanopy-env
|
|
SCANOPY_DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-password}@postgres:5432/scanopy
|
|
SCANOPY_WEB_EXTERNAL_PATH: /app/static
|
|
SCANOPY_PUBLIC_URL: ${SCANOPY_PUBLIC_URL:-http://localhost:${SCANOPY_SERVER_PORT:-60072}}
|
|
# How server reaches integrated daemon
|
|
# 172.17.0.1 is Docker's default bridge gateway. If your's is different, make sure to change it.
|
|
SCANOPY_INTEGRATED_DAEMON_URL: http://172.17.0.1:${SCANOPY_DAEMON_PORT:-60073}
|
|
volumes:
|
|
- ./data:/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
daemon:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- scanopy
|
|
|
|
volumes:
|
|
postgres_data:
|
|
daemon-config:
|
|
|
|
networks:
|
|
scanopy:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.0.0/16
|
|
gateway: 172.31.0.1
|