-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (82 loc) · 2.69 KB
/
Copy pathdocker-compose.yml
File metadata and controls
85 lines (82 loc) · 2.69 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
services:
db:
image: ${DOCKER_DB_IMAGE:-postgres:16-alpine}
restart: unless-stopped
environment:
POSTGRES_DB: auto_x_to_wechat
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d auto_x_to_wechat"]
interval: 10s
timeout: 5s
retries: 10
ports:
- "${DOCKER_DB_PORT:-55432}:5432"
api:
platform: ${DOCKER_API_PLATFORM:-linux/amd64}
build:
context: .
dockerfile: apps/api/Dockerfile
args:
NODE_IMAGE: ${DOCKER_NODE_BASE_IMAGE:-node:20-bookworm-slim}
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 3001
DATABASE_URL: postgresql://postgres:postgres@db:5432/auto_x_to_wechat?schema=public
INTERNAL_API_SHARED_SECRET: replace-with-an-internal-shared-secret
CREDENTIAL_ENCRYPTION_KEY: replace-with-32-byte-secret
CRAWLER_ADAPTER_NAME: mock
X_BINDING_SESSION_TIMEOUT_SECONDS: 600
REAL_CRAWLER_MAX_POSTS: 20
ENABLE_X_BROWSER_REMOTE_DESKTOP: "1"
X_BROWSER_REMOTE_DESKTOP_PORT: 6080
X_BROWSER_VNC_PORT: 5900
X_BROWSER_EXECUTABLE_PATH: /usr/bin/chromium
ports:
- "${DOCKER_API_PORT:-3001}:3001"
- "${DOCKER_BROWSER_DESKTOP_PORT:-6080}:6080"
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3001/health').then((response) => { if (!response.ok) { throw new Error('Unexpected status ' + response.status); } }).catch((error) => { console.error(error); process.exit(1); })",
]
interval: 15s
timeout: 5s
retries: 10
start_period: 15s
web:
build:
context: .
dockerfile: apps/web/Dockerfile
args:
NODE_IMAGE: ${DOCKER_NODE_BASE_IMAGE:-node:20-bookworm-slim}
profiles: ["full"]
restart: unless-stopped
depends_on:
db:
condition: service_healthy
api:
condition: service_healthy
environment:
NODE_ENV: production
NEXTAUTH_URL: http://localhost:${DOCKER_WEB_PORT:-3000}
NEXTAUTH_SECRET: replace-with-a-long-random-string
AUTH_TRUST_HOST: "true"
INTERNAL_API_BASE_URL: http://api:3001
INTERNAL_API_SHARED_SECRET: replace-with-an-internal-shared-secret
DATABASE_URL: postgresql://postgres:postgres@db:5432/auto_x_to_wechat?schema=public
X_BROWSER_REMOTE_DESKTOP_URL: http://localhost:${DOCKER_BROWSER_DESKTOP_PORT:-6080}/vnc.html?autoconnect=1&resize=scale&reconnect=1
ports:
- "${DOCKER_WEB_PORT:-3000}:3000"
volumes:
postgres-data: