-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
59 lines (56 loc) · 1.65 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
59 lines (56 loc) · 1.65 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
services:
mysql:
image: mysql:8.0@sha256:7dcddc01f13bab2f15cde676d44d01f61fc9f99fe7785e86196dfc07d358ae2b
restart: unless-stopped
environment:
MYSQL_DATABASE: webstore
MYSQL_USER: webstore
MYSQL_PASSWORD: ${MYSQL_PASSWORD:?Set MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:?Set MYSQL_ROOT_PASSWORD}
volumes:
- mysql-data:/var/lib/mysql
networks:
- backend
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uwebstore -p$$MYSQL_PASSWORD --silent"]
interval: 5s
timeout: 5s
retries: 20
start_period: 30s
webstore:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
mysql:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/webstore?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
SPRING_DATASOURCE_USERNAME: webstore
SPRING_DATASOURCE_PASSWORD: ${MYSQL_PASSWORD:?Set MYSQL_PASSWORD}
WEBSTORE_UPLOAD_DIR: /app/uploads
APP_ADMIN_BOOTSTRAP_ENABLED: ${APP_ADMIN_BOOTSTRAP_ENABLED:-false}
APP_ADMIN_EMAIL: ${APP_ADMIN_EMAIL:-}
APP_ADMIN_PASSWORD: ${APP_ADMIN_PASSWORD:-}
ports:
- "${WEBSTORE_PORT:-8080}:8080"
volumes:
- uploads:/app/uploads
networks:
- backend
- frontend
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:8080/actuator/health"]
interval: 10s
timeout: 3s
retries: 6
start_period: 40s
networks:
backend:
internal: true
frontend:
volumes:
mysql-data:
uploads: