-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose-prod.yml
52 lines (49 loc) · 1.29 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
services:
webserver:
image: nginx:mainline-alpine
container_name: webserver
restart: unless-stopped
environment:
NGINX_ENVSUBST_TEMPLATE_SUFFIX: ".conf"
DOMAIN: ${DOMAIN}
UPLOAD_LIMIT: ${UPLOAD_LIMIT}
ports:
- "80:80"
- "443:443"
networks:
- internal
volumes:
- ./nginx/production/templates:/etc/nginx/templates/
- ./public/:/var/www/html/
- ./logs/nginx:/var/log/nginx/
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
depends_on:
- nodejs
nodejs:
container_name: "nodejs"
restart: unless-stopped
image: "nodejs"
build:
context: .
dockerfile: Dockerfile
environment:
PROD_MODE: "true"
DOMAIN: ${DOMAIN}
UPLOAD_LIMIT: ${UPLOAD_LIMIT}
AUTODELETE_TIME: ${AUTODELETE_TIME}
PLAUSIBLE_DOMAIN: ${PLAUSIBLE_DOMAIN}
networks:
- internal
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
depends_on:
- webserver
command: certonly --webroot --webroot-path /var/www/certbot/ --email ${EMAIL} -d ${DOMAIN} --agree-tos --no-redirect --non-interactive
networks:
internal:
driver: bridge