generated from mrz1836/go-template
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
171 lines (161 loc) · 5.47 KB
/
docker-compose.yml
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
##########################################################
### !NOTE: This file is meant to be used by start.sh! ###
########################################################
name: "spv-wallet"
services:
wallet-frontend:
image: bsvb/spv-wallet-web-frontend:${RUN_WEB_FRONTEND_VERSION:-latest}
pull_policy: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.walletfrontend.rule=Host(`wallet.${RUN_PAYMAIL_DOMAIN}`)"
- "traefik.http.routers.walletfrontend.entrypoints=websecure"
- "traefik.http.routers.walletfrontend.tls=true"
- "traefik.http.routers.walletfrontend.tls.certresolver=httpsresolver"
- "traefik.http.services.walletfrontend.loadbalancer.server.port=80"
ports:
- "127.0.0.1:3002:80"
configs:
- source: frontend-env-config
target: /usr/share/nginx/html/env-config.json
wallet-backend:
image: bsvb/spv-wallet-web-backend:${RUN_WEB_BACKEND_VERSION:-latest}
pull_policy: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.walletbackend.rule=Host(`${RUN_API_DOMAIN}`)"
- "traefik.http.routers.walletbackend.entrypoints=websecure"
- "traefik.http.routers.walletbackend.tls=true"
- "traefik.http.routers.walletbackend.tls.certresolver=httpsresolver"
- "traefik.http.services.walletbackend.loadbalancer.server.port=8180"
environment:
SPVWALLET_PAYMAIL_DOMAIN: '${RUN_PAYMAIL_DOMAIN}'
env_file:
- .env.config
ports:
- "127.0.0.1:8180:8180"
links:
- wallet-postgresql
depends_on:
wallet-postgresql:
condition: service_healthy
block-headers-service:
image: bsvb/block-headers-service:${RUN_BHS_VERSION:-latest}
pull_policy: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.headers.rule=Host(`headers.${RUN_PAYMAIL_DOMAIN}`)"
- "traefik.http.routers.headers.entrypoints=websecure"
- "traefik.http.routers.headers.tls=true"
- "traefik.http.routers.headers.tls.certresolver=httpsresolver"
- "traefik.http.services.headers.loadbalancer.server.port=8080"
command:
- "--preloaded"
ports:
- "127.0.0.1:8080:8080"
volumes:
- block-headers-service-data:/app/data
spv-wallet-admin:
image: bsvb/spv-wallet-admin:${RUN_ADMIN_VERSION:-latest}
pull_policy: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.admin.rule=Host(`admin.${RUN_PAYMAIL_DOMAIN}`)"
- "traefik.http.routers.admin.entrypoints=websecure"
- "traefik.http.routers.admin.tls=true"
- "traefik.http.routers.admin.tls.certresolver=httpsresolver"
- "traefik.http.services.admin.loadbalancer.server.port=3000"
env_file:
- .env.config
ports:
- "127.0.0.1:3000:3000"
configs:
- source: admin-env-config
target: /usr/share/nginx/html/env-config.json
spv-wallet:
image: bsvb/spv-wallet:${RUN_SPVWALLET_VERSION:-latest}
pull_policy: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.wallet.rule=Host(`${RUN_PAYMAIL_DOMAIN}`)"
- "traefik.http.routers.wallet.entrypoints=websecure"
- "traefik.http.routers.wallet.tls=true"
- "traefik.http.routers.wallet.tls.certresolver=httpsresolver"
- "traefik.http.services.wallet.loadbalancer.server.port=3003"
environment:
SPVWALLET_PAYMAIL_DOMAINS: '${RUN_PAYMAIL_DOMAIN}'
env_file:
- .env.config
volumes:
- .:/config:ro
ports:
- "127.0.0.1:3003:3003"
restart: always
wallet-redis:
image: redis
hostname: redis
ports:
- "127.0.0.1:6379:6379"
volumes:
- wallet-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
wallet-postgresql:
image: postgres
volumes:
- wallet-postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U postgres -d postgres'"]
timeout: 5s
retries: 3
wallet-gateway:
image: traefik:v2.11
container_name: traefik
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--certificatesresolvers.httpsresolver.acme.storage=/gateway/acme.json"
- "--certificatesresolvers.httpsresolver.acme.tlschallenge=true"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "wallet-gateway-data:/gateway"
labels:
- "traefik.enable=true"
volumes:
wallet-postgresql-data:
driver: local
wallet-redis-data:
driver: local
block-headers-service-data:
driver: local
wallet-gateway-data:
driver: local
configs:
frontend-env-config:
content: |
{
"apiUrl": "http${RUN_SECURED_PROTOCOL_SUFFIX}://${RUN_API_DOMAIN}",
"wsUrl": "ws${RUN_SECURED_PROTOCOL_SUFFIX}://${RUN_API_DOMAIN}/api/websocket"
}
admin-env-config:
content: |
{
"serverUrl": "http${RUN_SECURED_PROTOCOL_SUFFIX}://${RUN_SPVWALLET_DOMAIN}",
"hideServerUrl": false
}