-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
93 lines (85 loc) · 2.47 KB
/
docker-compose-prod.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
87
88
89
90
91
92
93
version: '3.4'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
restart: always
ports:
- 80:${SERVER_PORT}
- 443:${SERVER_PORT}
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- letsencrypt-certs:/etc/nginx/certs
- letsencrypt-vhost-d:/etc/nginx/vhost.d
- letsencrypt-html:/usr/share/nginx/html
depends_on:
- app
networks:
- huformation_local_network
letsencrypt-proxy:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-proxy
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- letsencrypt-certs:/etc/nginx/certs
- letsencrypt-vhost-d:/etc/nginx/vhost.d
- letsencrypt-html:/usr/share/nginx/html
environment:
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
NGINX_PROXY_CONTAINER: nginx-proxy
depends_on:
- nginx-proxy
networks:
- huformation_local_network
postgres:
restart: always
image: 'postgres:12.2'
environment:
TZ: "Asia/Seoul"
POSTGRES_USER: ${USER_NAME}
POSTGRES_PASSWORD: ${PASSWORD}
POSTGRES_DB: ${POSTGRES_DB_NAME}
ports:
- ${POSTGRES_OUT_PORT}:5432
volumes:
- /var/lib/postgresql/docker/database:/var/lib/postgresql/database
networks:
- huformation_local_network
app:
restart: always
image: 'docker.pkg.github.com/roharon/huformation-i/huformation-i:latest'
labels:
- "com.centurylinklabs.watchtower.scope=myscope"
environment:
TZ: "Asia/Seoul"
SPRING_PROFILES_ACTIVE: default
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres/${POSTGRES_DB_NAME}
SPRING_DATASOURCE_USERNAME: ${USER_NAME}
SPRING_DATASOURCE_PASSWORD: ${PASSWORD}
SERVER_PORT: ${SERVER_PORT}
ports:
- ${SERVER_PORT}:${SERVER_PORT}
depends_on:
- postgres
networks:
- huformation_local_network
watchtower:
image: v2tec/watchtower:latest
environment:
TZ: "Asia/Seoul"
WATCHTOWER_ROLLING_RESTART: "true"
WATCHTOWER_SCOPE: myscope
WATCHTOWER_POLL_INTERVAL: 300
WATCHTOWER_NOTIFICATIONS: slack
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL: ${NOTIFY_SLACK_HOOK_URL}
WATCHTOWER_NOTIFICATION_SLACK_ICON_EMOJI=:whale:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/.docker/config.json:/config.json
networks:
huformation_local_network:
volumes:
letsencrypt-certs:
letsencrypt-vhost-d:
letsencrypt-html: