Ajouter compose.yml

This commit is contained in:
2026-01-11 16:13:54 +01:00
parent 5e709fb232
commit 7a9e40ff16

71
compose.yml Normal file
View File

@@ -0,0 +1,71 @@
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:
- "60073:60073"
env_file:
- .env
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
env_file:
- .env
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:
- "60072:60072"
env_file:
- .env
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