-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (83 loc) · 1.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (83 loc) · 1.96 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
services:
backend:
image: ${CI_REGISTRY_IMAGE}/backend:${TAG}
sysctls:
net.core.somaxconn: 1024
restart: unless-stopped
depends_on:
- db
volumes:
- ./backend_run:/run
- ./files:/code/files
environment:
SECRET_KEY:
ADMIN_PASSWORD:
DB_HOST:
DB_PASSWORD:
EMAIL_HOST:
EMAIL_PORT:
EMAIL_HOST_USER:
EMAIL_HOST_PASSWORD:
EMAIL_USE_TLS:
EMAIL_USE_SSL:
SCRIPT_NAME: ${BASE_URI}/api
WSGI_MODULE: backend:create_app()
# 101: nginx gid
WSGI_SOCKET_GID: 101
TZ:
db:
image: postgres:17-alpine
restart: unless-stopped
volumes:
- ./db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
TZ:
frontend:
image: ${CI_REGISTRY_IMAGE}/frontend:${TAG}
restart: unless-stopped
command:
- sh
- -c
- |
rm -f /run/nuxt.sock
node .output/server/index.mjs &
node_pid=$$!
while [ ! -S /run/nuxt.sock ]; do
sleep .1
done
chgrp "$$NITRO_SOCKET_GID" /run/nuxt.sock
chmod 660 /run/nuxt.sock
wait "$$node_pid"
volumes:
- ./frontend_run:/run
environment:
NUXT_APP_BASE_URL: ${BASE_URI}
NITRO_UNIX_SOCKET: /run/nuxt.sock
# 101: nginx gid
NITRO_SOCKET_GID: 101
TZ:
proxy:
image: nginx
depends_on:
- backend
- frontend
restart: unless-stopped
command:
- sh
- -c
- |
envsubst '$$BASE_URI $$CLIENT_MAX_BODY_SIZE' \
< /etc/nginx/nginx.conf.template \
> /etc/nginx/nginx.conf &&
rm -f /run/nginx.* &&
exec /docker-entrypoint.sh nginx -g 'daemon off;'
volumes:
- ./nginx.conf.template:/etc/nginx/nginx.conf.template:ro
- ./proxy_run:/run
- ./backend_run:/backend_run
- ./frontend_run:/frontend_run
environment:
BASE_URI:
CLIENT_MAX_BODY_SIZE: 10M
TZ: