1
1
version : ' 2.4'
2
2
services :
3
3
dbconfig :
4
+ env_file : .env
4
5
image : alpine:latest
5
6
volumes :
6
7
- conf:/app/conf # Mount the config directory on the host to the container
@@ -14,7 +15,8 @@ services:
14
15
protocol: \"postgres\"' > /app/conf/dbconfig"
15
16
16
17
postgres :
17
- image : postgres:latest
18
+ env_file : .env
19
+ image : postgres:16
18
20
environment :
19
21
POSTGRES_USER : ${DB_USER}
20
22
POSTGRES_PASSWORD : ${DB_PASSWORD}
@@ -27,11 +29,13 @@ services:
27
29
- oreowallet_network
28
30
healthcheck :
29
31
test : ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
30
- interval : 10s
32
+ interval : 5s
31
33
timeout : 5s
32
34
retries : 5
35
+ start_period : 10s
33
36
34
37
migration :
38
+ env_file : .env
35
39
build : .
36
40
image : " oreowallet"
37
41
command : /bin/sh -c "./sqlx database create && ./sqlx migrate run"
@@ -40,23 +44,27 @@ services:
40
44
networks :
41
45
- oreowallet_network
42
46
depends_on :
43
- - postgres
44
- - dbconfig
47
+ postgres :
48
+ condition : service_healthy
49
+ dbconfig :
50
+ condition : service_completed_successfully
45
51
logging :
46
52
driver : " json-file"
47
53
options :
48
54
max-file : " 4"
49
55
max-size : " 25m"
50
56
51
57
chainloader :
58
+ env_file : .env
52
59
build : .
53
60
restart : always
54
61
image : " oreowallet"
55
62
command : ./chain_loader --dbconfig /app/conf/dbconfig --node ${NODE_HOST}:${NODE_PORT} --verbosity ${VERBOSITY:-0}
56
63
volumes :
57
64
- conf:/app/conf
58
65
depends_on :
59
- - migration
66
+ migration :
67
+ condition : service_completed_successfully
60
68
networks :
61
69
- oreowallet_network
62
70
ulimits :
@@ -70,15 +78,18 @@ services:
70
78
max-size : " 25m"
71
79
72
80
prover :
81
+ env_file : .env
73
82
build : .
74
83
restart : always
75
84
image : " oreowallet"
76
85
command : ./prover --verbosity ${VERBOSITY:-0}
77
86
ports :
78
87
- " 10002:10002"
79
88
depends_on :
80
- - migration
81
- - chainloader
89
+ migration :
90
+ condition : service_completed_successfully
91
+ chainloader :
92
+ condition : service_completed_successfully
82
93
networks :
83
94
- oreowallet_network
84
95
ulimits :
@@ -92,6 +103,7 @@ services:
92
103
max-size : " 25m"
93
104
94
105
server :
106
+ env_file : .env
95
107
build : .
96
108
restart : always
97
109
image : " oreowallet"
@@ -121,6 +133,7 @@ services:
121
133
max-size : " 25m"
122
134
123
135
dservice :
136
+ env_file : .env
124
137
build : .
125
138
restart : always
126
139
image : " oreowallet"
@@ -134,8 +147,10 @@ services:
134
147
volumes :
135
148
- conf:/app/conf
136
149
depends_on :
137
- - migration
138
- - chainloader
150
+ migration :
151
+ condition : service_completed_successfully
152
+ chainloader :
153
+ condition : service_completed_successfully
139
154
networks :
140
155
oreowallet_network :
141
156
ipv4_address : 172.19.0.10
@@ -150,14 +165,18 @@ services:
150
165
max-size : " 25m"
151
166
152
167
dworker :
168
+ env_file : .env
153
169
build : .
154
170
restart : always
155
171
image : " oreowallet"
156
172
command : ./dworker --address 172.19.0.10:10001 --verbosity ${VERBOSITY:-0}
157
173
depends_on :
158
- - migration
159
- - chainloader
160
- - dservice
174
+ migration :
175
+ condition : service_completed_successfully
176
+ chainloader :
177
+ condition : service_completed_successfully
178
+ dservice :
179
+ condition : service_completed_successfully
161
180
networks :
162
181
- oreowallet_network
163
182
ulimits :
0 commit comments