forked from nginx-le/nginx-le
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
32 lines (29 loc) · 930 Bytes
/
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
version: '3.8'
services:
nginx:
build: .
image: 0x8861/nginx-le:stable
hostname: nginx
restart: always
container_name: nginx
logging:
driver: json-file
options:
max-size: '10m'
max-file: '5'
volumes:
- ./etc/ssl:/etc/nginx/ssl
- ./templates/service-example.conf:/etc/nginx/service.conf
# - ./etc/service-example-2.conf:/etc/nginx/service2.conf # more services, should be service*.conf
- ./templates/no-ssl.service-example.conf:/etc/nginx/no-ssl.service.conf # It is useful when you set LETSENCRYPT=false
ports:
- '80:80'
- '443:443'
environment:
- NGINX_LE_TZ=America/Vancouver
- NGINX_LE_LETSENCRYPT=true
- NGINX_LE_EMAIL=youremail@example.com
- NGINX_LE_FQDN=yourdomain.com
#- NGINX_LE_SSL_CERT=le-crt.pem
#- NGINX_LE_SSL_KEY=le-key.pem
#- NGINX_LE_SSL_CHAIN_CERT=le-chain-crt.pem