-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
104 lines (97 loc) · 2.24 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
version: '3.8'
services:
cucoapi_0:
container_name: cucoapi_0
image: cucoapi:test
build:
context: ./src
environment:
- ASPNETCORE_URLS=http://+:80
- ConnectionStrings__CucoDBContext=server=mysql;port=3306;user=${MYSQLCUCOUSER};pwd=${MYSQLCUCOPWD};database=${MYSQLCUCODB}
- OpenExchangeSettings__AppId=${OPENEXCHANGEAPPID}
- Redis__Host=${REDISHOST}
- Redis__Port=${REDISPORT}
- Redis__Password=${REDISPASS}
- JWT__Secret=${JWTSECRET}
- JWT__ExpirationInHours=${TOKENEXPIRATIONINHOURS}
depends_on:
- redis
- mysql
networks:
- cuco-net
deploy:
restart_policy:
condition: on-failure
healthcheck:
test: curl --fail http://localhost:80/healthz || exit 1
interval: 120s
retries: 10
timeout: 10s
cucosync:
container_name: cucosync
image: cucosync
build:
context: ./Cuco.Sync.Cron
environment:
- SyncCurrenciesEndpointBaseUrl=${CUCOAPI}
networks:
- cuco-net
depends_on:
- nginx
deploy:
restart_policy:
condition: on-failure
redis:
container_name: redis
image: redis
command: redis-server --requirepass ${REDISPASS}
networks:
- cuco-net
volumes:
- redis_data:/data
restart: on-failure
deploy:
restart_policy:
condition: on-failure
environment:
- REDIS_REPLICATION_MODE=master
sysctls:
- net.core.somaxconn=65535
mysql:
container_name: mysql
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=${MYSQLROOTPWD}
- MYSQL_DATABASE=${MYSQLCUCODB}
- MYSQL_USER=${MYSQLCUCOUSER}
- MYSQL_PASSWORD=${MYSQLCUCOPWD}
networks:
- cuco-net
volumes:
- mysql_data:/var/lib/mysql
restart: on-failure
deploy:
restart_policy:
condition: on-failure
nginx:
container_name: nginx
image: nginx:latest
build:
context: ./LoadBalancer
ports:
- "5100:5100"
networks:
- cuco-net
depends_on:
- cucoapi_0
restart: on-failure
deploy:
restart_policy:
condition: on-failure
networks:
cuco-net:
name: cuco-net
driver: bridge
volumes:
redis_data:
mysql_data: