-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (64 loc) · 1.57 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
version: '3.8'
services:
mariadb:
image: statesflow/partiel-app-mariadb:latest
container_name: mariadb-server
environment:
MYSQL_ROOT_PASSWORD: adminpassword
MYSQL_DATABASE: partielDatabase
MYSQL_USER: admin
MYSQL_PASSWORD: adminpassword
volumes:
- mariadb_data:/var/lib/mysql
- ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
ports:
- "3307:3306"
networks:
- partiel-network
healthcheck:
test: ["CMD-SHELL", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 3
flask:
image: statesflow/partiel-app-flask:latest
container_name: flask-partiel
environment:
- FLASK_ENV=development
- DATABASE_HOST=mariadb
- DATABASE_PORT=3306
- DATABASE_USER=admin
- DATABASE_PASSWORD=adminpassword
- DATABASE_NAME=partielDatabase
ports:
- "5001:5000"
depends_on:
- mariadb
networks:
- partiel-network
healthcheck:
test: ["CMD-SHELL", "curl -X GET", "http://localhost:5001/api/messages"]
interval: 10s
timeout: 5s
retries: 3
vuejs:
image: statesflow/partiel-app-vuejs:latest
container_name: vuejs-partiel
ports:
- "80:80"
depends_on:
- flask
networks:
- partiel-network
healthcheck:
test: ["CMD-SHELL", "curl --fail", "http://localhost:80"]
interval: 10s
timeout: 5s
retries: 3
volumes:
mariadb_data:
name: partiel_mariadb_data
networks:
partiel-network:
name: partiel-network
driver: bridge