-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (64 loc) · 2.3 KB
/
docker-compose.yml
File metadata and controls
80 lines (64 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
services:
syft-space-server:
build:
context: .
dockerfile: Dockerfile
target: production # Use 'development' for dev builds
image: syft-space-server:latest
container_name: syft-space-server
restart: unless-stopped
stop_grace_period: 15s # Allow time for provisioner shutdown
ports:
- "${SYFT_PORT:-8080}:8080"
volumes:
# Persist SQLite database
- syft-space-data:/data
- ${HOME}:/root
# macOS Docker Desktop socket location
- ${HOME}/.docker/run/docker.sock:/var/run/docker.sock
environment:
# Docker socket (override config from mounted home)
- DOCKER_HOST=unix:///var/run/docker.sock
# Application port
- SYFT_PORT=8080
# Database configuration
- SYFT_SQLITE_DB_PATH=/data/app.db
# Debug mode (set to true for development)
- SYFT_DEBUG=${SYFT_DEBUG:-false}
# Database reset (CAUTION: destroys all data)
- SYFT_RESET_DB=${SYFT_RESET_DB:-false}
# Multi-tenancy settings
- SYFT_ENABLE_MULTI_TENANCY=${SYFT_ENABLE_MULTI_TENANCY:-false}
- SYFT_DEFAULT_TENANT_NAME=${SYFT_DEFAULT_TENANT_NAME:-root}
# Authentication (empty = no auth, dev mode)
- SYFT_ADMIN_API_KEY=${SYFT_ADMIN_API_KEY:-}
# External service URLs
- SYFT_DEFAULT_ACCOUNTING_URL=${SYFT_DEFAULT_ACCOUNTING_URL:-https://syftaccounting.centralus.cloudapp.azure.com/}
- SYFT_DEFAULT_MARKETPLACE_URL=${SYFT_DEFAULT_MARKETPLACE_URL:-https://syfthub.openmined.org}
# Public URL (optional - for callbacks/webhooks)
- SYFT_PUBLIC_URL=${SYFT_PUBLIC_URL:-}
# Enable host.docker.internal on Linux (already works on macOS/Windows)
extra_hosts:
- "host.docker.internal:host-gateway"
# Health check using Python (no curl in distroless image)
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/api/v1/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Resource limits (adjust based on your needs)
deploy:
resources:
limits:
cpus: "2.0"
memory: 2G
reservations:
cpus: "0.5"
memory: 512M
volumes:
syft-space-data:
driver: local
networks:
default:
name: syft-space-network