-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (73 loc) · 1.88 KB
/
docker-compose.yml
File metadata and controls
73 lines (73 loc) · 1.88 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
63
64
65
66
67
68
69
70
71
72
73
services:
redis:
image: redis:latest
ports:
- '6380:6379'
healthcheck:
test: ["CMD", "redis-cli", "ping"]
timeout: 20s # 20초 동안 헬스 체크 진행
retries: 10 # 헬스 체크 진행 시간
mysql:
image: mysql:latest
ports:
- '23306:3306'
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: q!w@e#r$1234
MYSQL_DATABASE: highv
MYSQL_USER: admin
MYSQL_PASSWORD: qwer1234
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
backend:
env_file:
- ../E-Commerce/.env
image: openjdk:21
ports:
- '8080:8080'
volumes:
- ../E-Commerce/application.yml:/app/application.yml
- ../E-Commerce/build/libs/E-Commerce-0.0.1-SNAPSHOT.jar:/app/E-Commerce-0.0.1-SNAPSHOT.jar
depends_on:
redis:
condition: service_healthy
mysql:
condition: service_healthy
command: ["java", "-jar", "/app/E-Commerce-0.0.1-SNAPSHOT.jar"]
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://highv.cpcuesoama6y.us-east-1.rds.amazonaws.com:3306/highv
SPRING_DATASOURCE_USERNAME: admin
SPRING_DATASOURCE_PASSWORD: qwer1234
SPRING_REDIS_HOST: redis
AUTH_ISSUER: highv.com
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ]
interval: 20s
retries: 3
start_period: 30s
timeout: 10s
frontend:
build:
context: ../E-Commerce-Front
dockerfile: Dockerfile.front
ports:
- "5173:5173"
depends_on:
- backend
nginx:
image: nginx:alpine
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
#인증서 파일 경로 입력 필요
environment:
- TZ=Asia/Seoul
depends_on:
- backend
- frontend