-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (75 loc) · 1.56 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
version: '3.8'
services:
csv_server:
build:
context: .
dockerfile: ./csv_server/Dockerfile
restart: always
ports:
- 8000:8000
depends_on:
- mysql
env_file:
- .env
volumes:
- ./csv_server:/app
- ./wait-for-it.sh:/wait-for-it.sh
command: /wait-for-it.sh mysql:3306 -t 10 -- python -m uvicorn main:app --host 0.0.0.0 --port 8000
networks:
- wys-server
api_server:
build:
context: .
dockerfile: ./api-server/Dockerfile
ports:
- 8080:8080
depends_on:
- mysql
env_file:
- .env
volumes:
- ./wait-for-it.sh:/wait-for-it.sh
networks:
- wys-server
command: /wait-for-it.sh mysql:3306 -t 10 -- java -jar app.jar
mysql:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
restart: always
env_file:
- .env
ports:
- 3306:3306
volumes:
- ./mysql_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping -h localhost --silent" ]
interval: 10s
timeout: 5s
retries: 3
networks:
- wys-server
mongodb:
image: mongo:latest
ports:
- '27017:27017'
volumes:
- ./mongodb_data:/data/db
env_file:
- .env
command: mongod --auth
networks:
- wys-server
redis:
image: redis:latest
container_name: redis
ports:
- 6379:6379
networks:
- wys-server
volumes:
mysql_data:
mongodb_data:
networks:
wys-server: