-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (85 loc) · 2.43 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (85 loc) · 2.43 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
# Aether 自托管 docker-compose
# 用法:docker compose up -d
# 前置:在 .env 中配置 DATABASE_URL / BETTER_AUTH_SECRET / BETTER_AUTH_URL 等
# 迁移:首次启动后执行 pnpm --filter @aether/db db:migrate(或用 init 容器)
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: aether
POSTGRES_USER: aether
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-aether_dev}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aether -d aether"]
interval: 5s
timeout: 3s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis-data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
converge-server:
build:
context: .
dockerfile: apps/@aether/converge-server/Dockerfile
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 1234
DATABASE_URL: postgresql://aether:${POSTGRES_PASSWORD:-aether_dev}@postgres:5432/aether
REDIS_URL: redis://redis:6379
ports:
- "1234:1234"
web:
build:
context: .
dockerfile: apps/@aether/web/Dockerfile
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
converge-server:
condition: service_started
environment:
NODE_ENV: production
PORT: 3000
DATABASE_URL: postgresql://aether:${POSTGRES_PASSWORD:-aether_dev}@postgres:5432/aether
BETTER_AUTH_URL: ${BETTER_AUTH_URL:-http://localhost:3000}
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET}
NEXT_PUBLIC_EDITOR_HOST_URL: ${NEXT_PUBLIC_EDITOR_HOST_URL:-http://localhost:80}
NEXT_PUBLIC_CONVERGE_SERVER_URL: ${NEXT_PUBLIC_CONVERGE_SERVER_URL:-ws://localhost:1234}
ports:
- "3000:3000"
editor-host:
build:
context: .
dockerfile: apps/@aether/editor-host/Dockerfile
restart: unless-stopped
depends_on:
converge-server:
condition: service_started
environment:
NEXT_PUBLIC_CONVERGE_SERVER_URL: ${NEXT_PUBLIC_CONVERGE_SERVER_URL:-ws://localhost:1234}
ports:
- "80:80"
volumes:
postgres-data:
redis-data: