-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
182 lines (164 loc) · 3.78 KB
/
docker-compose.yaml
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
version: '3'
services:
user:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/user/main.go"
volumes:
- ./backend:/home/server
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8087:8087"
networks:
- api_network
customer:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/customer/main.go"
volumes:
- ./backend:/home/server
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8080:8080"
networks:
- api_network
payment:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/payment/main.go"
volumes:
- ./backend:/home/server
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8081:8081"
networks:
- api_network
auth:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/auth/main.go"
volumes:
- ./backend:/home/server
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8086:8086"
networks:
- api_network
membership:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/membership/main.go"
volumes:
- ./backend:/home/server
- ./backend/api.env:/home/server/api.env
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8082:8082"
networks:
- api_network
membership-type:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/membership-type/main.go"
volumes:
- ./backend:/home/server
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8084:8084"
networks:
- api_network
personnel:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/personnel/main.go"
volumes:
- ./backend:/home/server
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8083:8083"
networks:
- api_network
personaltraining:
image: golang:latest
depends_on:
- db
command: bash -c "sleep 0 && cd /home/server/ && go run micro-services/personaltraining/main.go"
volumes:
- ./backend:/home/server
env_file:
- ./backend/api.env
restart: on-failure
ports:
- "8085:8085"
networks:
- api_network
caddy:
image: caddy
container_name: caddy-container
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "80:80"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./frontend:/srv
- ./backend/static/media/customer-images:/srv/build/static/media/customer-images
- caddy_data:/data
- caddy_config:/config
networks:
- api_network
db:
image: postgres
container_name: postgres-container
restart: always
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- api_network
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin-container
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${ADMIN_MAIL}
PGADMIN_DEFAULT_PASSWORD: ${ADMIN_PASS}
ports:
- "5050:80"
networks:
- api_network
volumes:
pgdata:
caddy_data:
external: true
caddy_config:
networks:
api_network:
driver: bridge