-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (45 loc) · 1.13 KB
/
docker-compose.yml
File metadata and controls
48 lines (45 loc) · 1.13 KB
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
services:
mainapp:
image: sahilmandal/mystore-mainapp:latest
container_name: ecomapp
depends_on:
- mysql_db
environment:
SPRING_DATASOURCE_URL: "jdbc:mysql://mysql_db:3306/ecom_db?allowPublicKeyRetrieval=true&useSSL=false"
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: ""
ports:
- "8080:8080"
networks:
- ecomapp-network
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: always
mysql_db:
image: mysql:latest
container_name: mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: ecom_db
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
networks:
- ecomapp-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: always
volumes:
mysql-data:
networks:
ecomapp-network:
driver: bridge