-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (50 loc) · 1.22 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
version: "3.9"
services:
app:
image: papko26/gtw:latest
container_name: gtw
ports:
- "5000:5000"
env_file:
- gtw.env
environment:
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- FLASK_ENV=${FLASK_ENV}
- FLASK_DEBUG=${FLASK_DEBUG}
restart: always
nginx:
image: nginx:latest
container_name: nginx
depends_on:
- app
ports:
- "80:80"
- "443:443"
volumes:
- type: bind
source: /etc/nginx/nginx.conf
target: /etc/nginx/nginx.conf
read_only: true
- type: bind
source: /etc/nginx/certs
target: /etc/letsencrypt
read_only: true
- type: bind
source: /var/www/certbot
target: /var/www/certbot
restart: always
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- type: bind
source: /etc/nginx/certs
target: /etc/letsencrypt
- type: bind
source: /etc/nginx/certs-data
target: /var/lib/letsencrypt
- type: bind
source: /var/www/certbot
target: /var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do sleep 6h & wait $${!}; certbot renew; done'"
restart: unless-stopped