Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (106 loc) · 2.88 KB
/
Copy pathdocker-compose.yml
File metadata and controls
111 lines (106 loc) · 2.88 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
services:
# ── Aurora Panel ──
panel:
build:
context: .
dockerfile: Dockerfile
image: aurora-panel:latest
container_name: aurora-panel
network_mode: host
volumes:
- panel-data:/app/data
- server-data:/app/servers
environment:
- NODE_ENV=production
- PORT=3000
- BODY_SIZE_LIMIT=Infinity
- DATABASE_URL=${DATABASE_URL:-file:./data/aurora.db}
- AUTH_SECRET=${AUTH_SECRET:?AUTH_SECRET is required}
- DAEMON_JWT_SECRET=${DAEMON_JWT_SECRET:?DAEMON_JWT_SECRET is required}
- PUBLIC_APP_URL=${PUBLIC_APP_URL:-http://localhost:3000}
- SOCKET_PORT=${SOCKET_PORT:-3001}
restart: unless-stopped
stop_grace_period: 30s
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/login"]
interval: 30s
timeout: 10s
start_period: 10s
retries: 5
# ── Aurora Daemon ──
daemon:
build:
context: ./daemon
dockerfile: Dockerfile
image: aurora-daemon:latest
container_name: aurora-daemon
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- server-data:/servers
- daemon-data:/data
environment:
- NODE_ENV=production
- DAEMON_PORT=8443
- PANEL_URL=${PANEL_URL:-http://localhost:3001}
- DAEMON_JWT_SECRET=${DAEMON_JWT_SECRET:?DAEMON_JWT_SECRET is required}
- DAEMON_ID=${DAEMON_ID:-node-01}
- DAEMON_NAME=${DAEMON_NAME:-Primary Node}
- DAEMON_HOST=${DAEMON_HOST:-localhost}
- SERVERS_DIR=/servers
- DATA_DIR=/data
- DOCKER_NETWORK=aurora
- AUTO_RESTART=${AUTO_RESTART:-true}
- MAX_CRASH_RESTARTS=${MAX_CRASH_RESTARTS:-3}
restart: unless-stopped
stop_grace_period: 15s
# ── PostgreSQL (Optional: enable with --profile with-postgres) ──
postgres:
image: postgres:16-alpine
profiles:
- with-postgres
environment:
POSTGRES_USER: aurora
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
POSTGRES_DB: aurora
volumes:
- pgdata:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aurora"]
interval: 10s
timeout: 5s
retries: 5
networks:
- aurora
# ── Caddy Reverse Proxy (Optional: enable with --profile with-caddy) ──
caddy:
image: caddy:2-alpine
profiles:
- with-caddy
ports:
- "80:80"
- "443:443"
volumes:
- caddy-data:/data
- caddy-config:/config
- ./Caddyfile:/etc/caddy/Caddyfile:ro
environment:
- DOMAIN=${DOMAIN:-panel.example.com}
- PANEL_PORT=3000
restart: unless-stopped
depends_on:
- panel
networks:
- aurora
volumes:
pgdata:
panel-data:
server-data:
daemon-data:
caddy-data:
caddy-config:
networks:
aurora:
name: aurora
driver: bridge