Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (120 loc) · 4.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
125 lines (120 loc) · 4.12 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Loopback-only local development stack. This is not a production deployment topology.
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: doc
POSTGRES_USER: doc
POSTGRES_PASSWORD: doc
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U doc -d doc']
interval: 5s
timeout: 3s
retries: 20
ports:
- '127.0.0.1:${DOC_POSTGRES_PORT:-5432}:5432'
volumes:
- doc-postgres:/var/lib/postgresql/data
mailpit:
image: axllent/mailpit:v1.30.0
healthcheck:
test: ['CMD', '/mailpit', 'readyz']
interval: 5s
timeout: 3s
retries: 20
ports:
- '127.0.0.1:${DOC_MAILPIT_SMTP_PORT:-1025}:1025'
- '127.0.0.1:${DOC_MAILPIT_UI_PORT:-8025}:8025'
collaboration:
build:
context: .
dockerfile: services/collaboration/Dockerfile
environment:
PORT: 1234
DATABASE_URL: postgresql://doc:doc@postgres:5432/doc?schema=public
API_AUTH_KEY: ${COLLABORATE_API_AUTH_KEY:?COLLABORATE_API_AUTH_KEY is required}
INTERNAL_API_KEY: ${COLLABORATE_INTERNAL_API_KEY:?COLLABORATE_INTERNAL_API_KEY is required}
COLLABORATE_INTERNAL_API_KEY: ${COLLABORATE_INTERNAL_API_KEY:?COLLABORATE_INTERNAL_API_KEY is required}
DOC_WEB_INTERNAL_URL: http://web:3000
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://127.0.0.1:1234/ready').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))",
]
interval: 5s
timeout: 3s
retries: 20
ports:
- '127.0.0.1:${DOC_COLLABORATION_PORT:-1234}:1234'
migrate:
build:
context: .
target: migrator
command: ['npm', 'run', 'db:push']
environment:
DATABASE_URL: postgresql://doc:doc@postgres:5432/doc?schema=public
depends_on:
postgres:
condition: service_healthy
restart: 'no'
web:
build:
context: .
args:
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3100}
NEXT_PUBLIC_COLLABORATE_EDIT_URL: ${NEXT_PUBLIC_COLLABORATE_EDIT_URL:-ws://localhost:1234/collaborate}
NEXT_PUBLIC_OSS_CDN_HOSTNAME: ${NEXT_PUBLIC_OSS_CDN_HOSTNAME:-}
environment:
NODE_ENV: production
DATABASE_URL: postgresql://doc:doc@postgres:5432/doc?schema=public
AUTH_SECRET: ${AUTH_SECRET:?AUTH_SECRET is required}
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3100}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3100}
AUTH_GITHUB_ID: ${AUTH_GITHUB_ID:-}
AUTH_GITHUB_SECRET: ${AUTH_GITHUB_SECRET:-}
EMAIL_FROM: ${EMAIL_FROM:-}
EMAIL_HOST: ${EMAIL_CONTAINER_HOST:-${EMAIL_HOST:-mailpit}}
EMAIL_PORT: ${EMAIL_CONTAINER_PORT:-${EMAIL_PORT:-1025}}
EMAIL_USERNAME: ${EMAIL_USERNAME:-}
EMAIL_PASSWORD: ${EMAIL_PASSWORD:-}
EMAIL_SECURE: ${EMAIL_SECURE:-false}
RESEND_API_KEY: ${RESEND_API_KEY:-}
NOTICE_EMAIL_TO: ${NOTICE_EMAIL_TO:-}
OSS_ACCESS_KEY_ID: ${OSS_ACCESS_KEY_ID:-}
OSS_ACCESS_KEY_SECRET: ${OSS_ACCESS_KEY_SECRET:-}
OSS_REGION: ${OSS_REGION:-}
OSS_BUCKET: ${OSS_BUCKET:-}
NEXT_PUBLIC_OSS_CDN_HOSTNAME: ${NEXT_PUBLIC_OSS_CDN_HOSTNAME:-}
DEEP_SEEK_API_KEY: ${DEEP_SEEK_API_KEY:-}
DEEP_BRICKS_API_KEY: ${DEEP_BRICKS_API_KEY:-}
COLLABORATE_EDIT_HTTP_URL: http://collaboration:1234
COLLABORATE_API_AUTH_KEY: ${COLLABORATE_API_AUTH_KEY:?COLLABORATE_API_AUTH_KEY is required}
COLLABORATE_INTERNAL_API_KEY: ${COLLABORATE_INTERNAL_API_KEY:?COLLABORATE_INTERNAL_API_KEY is required}
depends_on:
mailpit:
condition: service_healthy
migrate:
condition: service_completed_successfully
collaboration:
condition: service_healthy
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://127.0.0.1:3000/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))",
]
interval: 5s
timeout: 3s
retries: 30
ports:
- '127.0.0.1:${DOC_WEB_PORT:-3100}:3000'
volumes:
doc-postgres: