Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
142 lines (133 loc) · 4.09 KB
/
Copy pathcompose.yaml
File metadata and controls
142 lines (133 loc) · 4.09 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
name: browser-platform
services:
runtime-ready:
image: browser-platform-runtime:compose
platform: linux/amd64
build:
context: ./browser-runtime-image
entrypoint: ["/bin/true"]
network_mode: none
restart: "no"
mysql:
image: mysql:8.4
environment:
MYSQL_DATABASE: browser_platform
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_root_password
secrets:
- mysql_root_password
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot --password=$$(cat /run/secrets/mysql_root_password) --silent"]
interval: 5s
timeout: 5s
retries: 30
restart: unless-stopped
networks: [control]
schema:
image: browser-platform-server:compose
build:
context: .
dockerfile: browser-platform-server/Dockerfile
entrypoint: ["/bin/sh", "-c"]
command:
- >-
export SCHEMA_DB_PASSWORD="$$(cat /run/secrets/mysql_root_password)";
exec java -jar /app/app.jar --spring.profiles.active=schema
environment:
SCHEMA_DB_URL: jdbc:mysql://mysql:3306/browser_platform?connectionTimeZone=UTC&forceConnectionTimeZoneToSession=true
SCHEMA_DB_USERNAME: root
secrets:
- mysql_root_password
- api_key
depends_on:
mysql:
condition: service_healthy
restart: "no"
networks: [control]
db-permissions:
image: mysql:8.4
entrypoint: ["/bin/sh", "/opt/browser-platform/configure-db.sh"]
volumes:
- ./deploy/compose/configure-db.sh:/opt/browser-platform/configure-db.sh:ro
secrets:
- mysql_root_password
- db_app_password
depends_on:
schema:
condition: service_completed_successfully
restart: "no"
networks: [control]
backend:
image: browser-platform-server:compose
build:
context: .
dockerfile: browser-platform-server/Dockerfile
environment:
DB_URL: jdbc:mysql://mysql:3306/browser_platform
DB_USERNAME: browser_app
PLATFORM_RUNTIME_IMAGE_TAG: browser-platform-runtime:compose
PLATFORM_ENVIRONMENT_PROFILE_ROOT: ${PROFILE_ROOT:-/data/browser/profiles}
PLATFORM_API_KEY_RESOURCE: file:/run/secrets/api_key
PLATFORM_BROWSER_PUBLIC_BASE_URL: ${PLATFORM_BROWSER_PUBLIC_BASE_URL:-https://localhost}
secrets:
- db_app_password
- proxy_secret_key
- api_key
- kasm_vnc_password
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${PROFILE_ROOT:-/data/browser/profiles}:${PROFILE_ROOT:-/data/browser/profiles}
ports:
- 127.0.0.1:${BACKEND_PORT:-8080}:8080
depends_on:
runtime-ready:
condition: service_completed_successfully
db-permissions:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:8080/actuator/health"]
interval: 10s
timeout: 5s
retries: 30
restart: unless-stopped
networks: [control, edge]
gateway:
image: browser-platform-gateway:compose
build:
context: .
dockerfile: browser-platform-web/Dockerfile
network_mode: host
environment:
GATEWAY_BIND: ${GATEWAY_BIND:-127.0.0.1}
GATEWAY_INTERNAL_PORT: ${GATEWAY_PORT:-8081}
BACKEND_PORT: ${BACKEND_PORT:-8080}
NGINX_ENVSUBST_FILTER: ^(GATEWAY_BIND|GATEWAY_INTERNAL_PORT|BACKEND_PORT|KASMVNC_AUTHORIZATION)$$
secrets:
- kasm_vnc_password
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:${GATEWAY_PORT:-8081}/actuator/health"]
interval: 10s
timeout: 5s
retries: 12
restart: unless-stopped
secrets:
mysql_root_password:
file: ./deploy/compose/secrets/mysql_root_password
db_app_password:
file: ./deploy/compose/secrets/db_app_password
proxy_secret_key:
file: ./deploy/compose/secrets/proxy_secret_key
api_key:
file: ./deploy/compose/secrets/api_key
kasm_vnc_password:
file: ./deploy/compose/secrets/kasm_vnc_password
volumes:
mysql-data:
networks:
control:
internal: true
edge: {}