forked from LondheShubham153/retail-store-sample-app
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (61 loc) · 1.49 KB
/
docker-compose.yml
File metadata and controls
62 lines (61 loc) · 1.49 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
services:
catalog:
build:
context: .
hostname: catalog
depends_on:
catalog-db:
condition: service_healthy
restart: true
restart: always
cap_drop:
- all
security_opt:
- no-new-privileges:true
environment:
- GIN_MODE=release
- reschedule=on-node-failure
- RETAIL_CATALOG_PERSISTENCE_PROVIDER=mysql
- RETAIL_CATALOG_PERSISTENCE_PASSWORD=${DB_PASSWORD}
- RETAIL_CATALOG_PERSISTENCE_ENDPOINT=catalog-db:3306
ports:
- "8081:8080"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
interval: 10s
timeout: 10s
retries: 3
develop:
watch:
- action: rebuild
path: .
# nosemgrep: yaml.docker-compose.security.writable-filesystem-service.writable-filesystem-service
catalog-db:
image: mariadb:10.9
hostname: catalog-db
restart: always
security_opt:
- no-new-privileges:true
environment:
- reschedule=on-node-failure
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=catalogdb
- MYSQL_USER=catalog_user
- MYSQL_PASSWORD=${DB_PASSWORD}
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"localhost",
"-u",
"catalog_user",
"-p${DB_PASSWORD}",
]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s