-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcompose.yml
More file actions
188 lines (174 loc) · 4.98 KB
/
compose.yml
File metadata and controls
188 lines (174 loc) · 4.98 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Compose file for local development
x-defaults: &defaults
restart: always
init: true
env_file:
- .env
environment: &environment
DOCKER: true
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
logging:
driver: 'json-file'
options:
max-size: '5m'
max-file: '10'
tag: '{{.Name}}'
healthcheck: &healthcheck
interval: 15s
timeout: 7s
retries: 3
start_period: 10s
x-base: &base
build: .
user: root
services:
postgres:
<<: *defaults
image: postgres:15.4-alpine
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
<<: *healthcheck
test: ['CMD', 'nc', '-zv', 'localhost', '5432']
cdn:
<<: *defaults
image: nginx:1.29.1-alpine
ports:
- 8080:80
volumes:
- ./docker/cdn/nginx.conf:/etc/nginx/nginx.conf
- cdn:/var/www/cdn
api:
<<: [*defaults, *base]
command: pnpm turbo run dev --env-mode=loose --filter='@blms/api'
ports:
- 3000:3000
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
HOST: 0.0.0.0
POSTGRES_HOST: postgres
TYPESENSE_NODES: http://typesense:8108
ONLYOFFICE_URL: ${ONLYOFFICE_URL:-http://localhost:80}
volumes:
- ./apps/api:/home/node/apps/api
- /home/node/apps/api/node_modules/
- ./packages/service-content/src:/home/node/packages/service-content/src
- ./packages/database/src:/home/node/packages/database/src
- ./packages/database/drizzle:/home/node/packages/database/drizzle
- ./packages/database/dist:/home/node/packages/database/dist
- ./packages/schemas/src:/home/node/packages/schemas/src
- ./packages/types/src:/home/node/packages/types/src
- ./packages/service-user/src:/home/node/packages/service-user/src
- ./.env:/home/node/.env
- cdn:$CDN_PATH
- sync:${SYNC_PATH:-/tmp/sync}
- ${OTS_PGP_KEY_PATH:-./key.asc}:/tmp/key.asc:ro
depends_on:
- typesense
- postgres
healthcheck:
<<: *healthcheck
test: ['CMD', 'nc', '-zv', 'localhost', '3000']
academy:
<<: *defaults
build: .
user: "${UID:-1000}:${GID:-1000}"
command: pnpm turbo run dev --env-mode=loose --filter='@blms/academy'
ports:
- 8181:8181
volumes:
- ./apps/academy:/home/node/apps/academy
- ./packages:/home/node/packages
- /home/node/apps/academy/node_modules/
- cdn:$CDN_PATH
depends_on:
- api
healthcheck:
<<: *healthcheck
test: ['CMD', 'nc', '-zv', 'localhost', '8181']
contribute:
<<: *defaults
build: .
user: "${UID:-1000}:${GID:-1000}"
command: pnpm turbo run dev --env-mode=loose --filter='@blms/contribute'
environment:
VITE_ONLYOFFICE_API_URL: ${VITE_ONLYOFFICE_API_URL:-http://localhost:80/web-apps/apps/api/documents/api.js}
ports:
- 8280:8280
volumes:
- ./apps/contribute:/home/node/apps/contribute
- ./packages:/home/node/packages
- /home/node/apps/contribute/node_modules/
depends_on:
- api
healthcheck:
<<: *healthcheck
test: ['CMD', 'nc', '-zv', 'localhost', '8280']
network:
<<: *defaults
build: .
user: "${UID:-1000}:${GID:-1000}"
command: pnpm turbo run dev --env-mode=loose --filter='@blms/network'
ports:
- 8383:8383
volumes:
- ./apps/network:/home/node/apps/network
- ./packages:/home/node/packages
- /home/node/apps/network/node_modules/
depends_on:
- api
healthcheck:
<<: *healthcheck
test: ['CMD', 'nc', '-zv', 'localhost', '8383']
# https://typesense.org
typesense:
image: typesense/typesense:28.0
ports:
- 8108:8108
container_name: typesense
environment:
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY:-xyz}
- TYPESENSE_DATA_DIR=/usr/share/typesense/data
- GLOG_minloglevel=2 # https://github.com/typesense/typesense/issues/475
volumes:
- typesense:/usr/share/typesense/data
# ONLYOFFICE Document Server for rich PPTX editing
onlyoffice:
<<: *defaults
image: onlyoffice/documentserver:9.0
ports:
- 80:80
environment:
- ONLYOFFICE_HTTPS_HSTS_ENABLED=false
- ONLYOFFICE_HTTPS_HSTS_MAXAGE=31536000
- JWT_ENABLED=false
- JWT_SECRET=
- JWT_HEADER=Authorization
- JWT_IN_BODY=true
- WOPI_ENABLED=false
- USE_UNAUTHORIZED_STORAGE=true
- ONLYOFFICE_DEFAULT_FORMATS=docx;xlsx;pptx
- ALLOW_PRIVATE_IP_ADDRESS=true
- ALLOW_HTTP_REQUEST_TO_EDIT_DOCUMENT=true
- ALLOW_META_IP_ADDRESS=true
- DENY_EMBEDDED_FONTS=false
- ONLYOFFICE_TIMEOUT_DOWNLOAD=120000
- ONLYOFFICE_MAX_PROCESSES=10
- ONLYOFFICE_TIMEOUT_CONVERSION=120000
- ONLYOFFICE_MAX_FILE_SIZE=104857600
- ONLYOFFICE_MAX_TEMPLATE_SIZE=104857600
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
<<: *healthcheck
test: ['CMD', 'nc', '-zv', 'localhost', '80']
volumes:
typesense:
corestore:
postgres:
cdn:
sync: