-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
86 lines (79 loc) · 1.89 KB
/
docker-compose.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3'
services:
nginx:
container_name: npt_nginx
image: nginx
ports:
- 80:80
- 443:443
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- spring
- node
environment:
- TZ="Asia/Seoul"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
mysql:
container_name: npt_mysql
image: mysql:8.0
environment:
MYSQL_ROOT_HOST: "%"
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
volumes:
- mysql-volume:/var/lib/mysql
ports:
- "3306:3306"
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
redis:
container_name: npt_redis
image: redis:latest
command: redis-server --port 6379
ports:
- "6379:6379"
spring:
container_name: npt_spring_backend
image: ${DOCKER_USERNAME}/${DOCKER_SPRING_REPO}
restart: on-failure
expose:
- 8080
env_file:
- .env
depends_on:
- mysql
- redis
environment:
- TZ=Asia/Seoul
node:
container_name: npt_node_backend
image: ${DOCKER_USERNAME}/${DOCKER_NODE_REPO}
restart: on-failure
expose:
- 3000
env_file:
- .env
depends_on:
- mysql
- redis
environment:
- TZ=Asia/Seoul
volumes:
- images-volume:/var/app/uploads
certbot:
image: certbot/certbot
container_name: certbot_service
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
mysql-volume: {}
images-volume: {}