-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 1.17 KB
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 1.17 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
version: '3.8'
services:
spring-app:
image: ptmatch:latest
container_name: ptmatch
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
# SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
SPRING_JWT_SECRET: ${SPRING_JWT_SECRET}
expose:
- "8080"
restart: always
nginx:
image: nginx:latest
container_name: nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
# 로컬의 nginx 설정 파일을 컨테이너에 마운트
- ./nginx/conf.d:/etc/nginx/conf.d
# 호스트(서버)에 있는 SSL 인증서 관련 폴더 전체를 컨테이너에 마운트
- /etc/letsencrypt:/etc/letsencrypt:ro
# (선택) 호스트 Certbot 갱신을 위한 웹루트 폴더 공유
- /var/www/certbot:/var/www/certbot
healthcheck:
test: [ "CMD", "nginx", "-t" ]
interval: 30s
timeout: 5s
retries: 3
depends_on:
- ptmatch
volumes:
certbot-conf:
certbot-www: