forked from openfort-xyz/opensigner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
213 lines (204 loc) · 6.44 KB
/
docker-compose.yml
File metadata and controls
213 lines (204 loc) · 6.44 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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
services:
postgres:
image: postgres:16
container_name: ofpostgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres_password}
volumes:
- of_postgres_data:/var/lib/postgresql/data
- ./postgres/init.sql:/docker-entrypoint-initdb.d/create_database.sql
networks:
- db_network
expose:
- "5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 4s
retries: 10
mysql:
image: mysql:8.4
container_name: ofmysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root_password}
MYSQL_DATABASE: ${MYSQL_SHIELD_DATABASE:-shield}
MYSQL_USER: ${MYSQL_USER:-mysql_user}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-mysql_password}
volumes:
- of_mysql_data:/var/lib/mysql
networks:
- db_network
expose:
- "3306"
restart: always
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 5s
timeout: 5s
retries: 20
start_period: 30s
iframe:
container_name: iframe
volumes:
- ./iframe/iframe_nginx.conf:/etc/nginx/templates/default.conf.template
image: ghcr.io/openfort-xyz/iframe:latest
entrypoint: ["/bin/sh", "-c", "envsubst '$$IFRAME_ALLOWED_ORIGINS $$IFRAME_BACKEND_API' < /etc/nginx/templates/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"]
environment:
PORT: ${IFRAME_CONTAINER_PORT:-5173}
IFRAME_ALLOWED_ORIGINS: ${IFRAME_ALLOWED_ORIGINS:-http://localhost:7050 http://localhost:7051}
IFRAME_BACKEND_API: ${IFRAME_BACKEND_API:-http://localhost:7053 http://localhost:7054}
networks:
- db_network
expose:
- "5173"
ports:
- "${IFRAME_HOST_PORT:-7050}:${IFRAME_CONTAINER_PORT:-5173}"
depends_on:
auth_service:
condition: service_started
restart: true
restart: unless-stopped
iframe-sample:
container_name: iframe-sample
build:
context: ./iframe/sample
dockerfile: Dockerfile
image: openfort/iframe-sample:latest
environment:
PORT: ${IFRAME_SAMPLE_CONTAINER_PORT:-3000}
networks:
- db_network
expose:
- "3000"
ports:
- "${IFRAME_SAMPLE_HOST_PORT:-7051}:${IFRAME_SAMPLE_CONTAINER_PORT:-3000}"
depends_on:
auth_service:
condition: service_started
restart: true
iframe:
condition: service_started
restart: true
restart: unless-stopped
auth_service:
container_name: authservice
build:
context: ./auth_service
dockerfile: Dockerfile
image: openfort/auth_service:latest
environment:
HOST: ${AUTH_SERVICE_CONTAINER_HOST:-0.0.0.0}
PORT: ${AUTH_SERVICE_CONTAINER_PORT:-3000}
BETTER_AUTH_BASE_URL: ${BETTER_AUTH_BASE_URL:-http://localhost:7052}
DB_NAME: ${AUTH_SERVICE_DB_NAME:-authservice}
DB_USER: ${AUTH_SERVICE_DB_USER:-postgres}
DB_PASS: ${AUTH_SERVICE_DB_PASS:-postgres_password}
DB_HOST: ${AUTH_SERVICE_DB_HOST:-ofpostgres}
DB_PORT: ${AUTH_SERVICE_DB_PORT:-5432}
DB_SSLMODE: ${AUTH_SERVICE_DB_SSLMODE:-require}
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET must be set}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost:7050,http://localhost:7051}
networks:
- db_network
expose:
- "${AUTH_SERVICE_CONTAINER_PORT:-3000}"
ports:
- "${AUTH_SERVICE_HOST_PORT:-7052}:${AUTH_SERVICE_CONTAINER_PORT:-3000}"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:$PORT/health"]
interval: 15s
timeout: 5s
retries: 10
cold_storage:
container_name: coldstorage
platform: linux/amd64
image: ghcr.io/openfort-xyz/shield:v0.2.30
command: server
depends_on:
mysql:
condition: service_healthy
environment:
DB_DRIVER: ${COLD_STORAGE_DB_DRIVER:-mysql}
DB_NAME: ${COLD_STORAGE_DB_NAME:-shield}
DB_USER: ${COLD_STORAGE_DB_USER:-mysql_user}
DB_PASS: ${COLD_STORAGE_DB_PASS:-mysql_password}
DB_HOST: ${COLD_STORAGE_DB_HOST:-ofmysql}
DB_PORT: ${COLD_STORAGE_DB_PORT:-3306}
networks:
- db_network
expose:
- "${COLD_STORAGE_CONTAINER_PORT:-8080}"
ports:
- "${COLD_STORAGE_HOST_PORT:-7053}:${COLD_STORAGE_CONTAINER_PORT:-8080}"
restart: unless-stopped
hot_storage:
container_name: hotstorage
build:
context: ./hot_storage
dockerfile: Dockerfile
image: openfort/hot_storage:latest
environment:
HOST: ${HOT_STORAGE_CONTAINER_HOST:-0.0.0.0}
PORT: ${HOT_STORAGE_CONTAINER_PORT:-8080}
AUTH_SERVER_URL: ${AUTH_SERVER_URL:-http://authservice:3000}
DB_NAME: ${HOT_STORAGE_DB_NAME:-hotstorage}
DB_USER: ${HOT_STORAGE_DB_USER:-postgres}
DB_PASS: ${HOT_STORAGE_DB_PASS:-postgres_password}
DB_HOST: ${HOT_STORAGE_DB_HOST:-ofpostgres}
DB_PORT: ${HOT_STORAGE_DB_PORT:-5432}
DB_SSLMODE: ${HOT_STORAGE_DB_SSLMODE:-require}
SHARE_ENCRYPTION_KEY: ${SHARE_ENCRYPTION_KEY:?SHARE_ENCRYPTION_KEY must be set (64 hex chars)}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost:7050,http://localhost:7051}
networks:
- db_network
expose:
- "${HOT_STORAGE_CONTAINER_PORT:-8080}"
ports:
- "${HOT_STORAGE_HOST_PORT:-7054}:${HOT_STORAGE_CONTAINER_PORT:-8080}"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:$PORT/health"]
interval: 15s
timeout: 5s
retries: 10
docs:
container_name: docs
build:
context: ./docs
dockerfile: Dockerfile
args:
NODE_AUTH_TOKEN: ${NODE_AUTH_TOKEN}
image: openfort/keys-docs:latest
environment:
PORT: ${DOCS_CONTAINER_PORT:-4173}
networks:
- db_network
expose:
- "${DOCS_CONTAINER_:-4173}"
ports:
- "${DOCS_HOST_PORT:-7055}:${DOCS_CONTAINER_PORT:-4173}"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:$PORT/health.json"]
interval: 15s
timeout: 5s
retries: 10
networks:
db_network:
driver: bridge
volumes:
of_postgres_data:
of_mysql_data: