-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (68 loc) · 1.76 KB
/
docker-compose.yml
File metadata and controls
71 lines (68 loc) · 1.76 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
version: '3'
services:
nginx:
image: nginx
restart: always
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- tool-application
environment:
- TZ=Asia/Seoul
ports:
- "80:80"
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
tool-redis:
image: redis:latest
container_name: tool_redis
hostname: tool
command: redis-server --requirepass ${REDIS_PASSWORD}
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
ports:
- 6379:6379
tool-database:
image: mysql:8.0
container_name: tool_mysql
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_ROOT_HOST: '%'
TZ: Asia/Seoul
volumes:
- ./mysql_data:/var/lib/mysql
ports:
- 3306:3306
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
tool-application:
image: ${DOCKER_USERNAME}/${DOCKER_REPO}
container_name: tool_application
restart: always
expose:
- 8080
depends_on:
- tool-database
- tool-redis
ports:
- "8080:8080"
env_file:
- .env
environment:
TZ: Asia/Seoul
volumes:
- /home/jeon050419/images:/app/files
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;'"