forked from pplonski/mail4gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-https.yml
41 lines (38 loc) · 1.34 KB
/
docker-compose-https.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
version: '2'
services:
nginx:
restart: unless-stopped
image: nginx:stable-alpine
ports:
- 80:80
- 443:443
volumes:
- ./docker/nginx/pro:/etc/nginx/conf.d
- ./docker/nginx/certbot/conf:/etc/letsencrypt
- ./docker/nginx/certbot/www:/var/www/certbot
depends_on:
- server
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./docker/nginx/certbot/conf:/etc/letsencrypt
- ./docker/nginx/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
server:
restart: unless-stopped
build:
context: .
dockerfile: ./docker/server/Dockerfile
entrypoint: /app/docker/server/entrypoint.sh
expose:
- 8000
environment:
SECRET_KEY: ${SECRET_KEY}
EMAIL_ADDRESS: ${EMAIL_ADDRESS}
EMAIL_PASSWORD: ${EMAIL_PASSWORD}
IMAP_ADDRESS: ${IMAP_ADDRESS}
IMAP_PORT: ${IMAP_PORT}
SMTP_ADDRESS: ${SMTP_ADDRESS}
SMTP_PORT: ${SMTP_PORT}