Add RESTART env variable
This commit is contained in:
parent
d5b6fa15a8
commit
8c436389d1
|
@ -2,7 +2,7 @@ version: "3.7"
|
|||
services:
|
||||
nginx:
|
||||
container_name: nginx
|
||||
restart: unless-stopped
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
hostname: ${DOMAIN_NAME:?err}
|
||||
volumes:
|
||||
- './http-root:/var/lib/nginx/html/http-root:ro'
|
||||
|
@ -26,13 +26,13 @@ services:
|
|||
- 22000:22000/tcp
|
||||
- 22000:22000/udp
|
||||
- 21027:21027/udp
|
||||
restart: unless-stopped
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
|
||||
cloudflared:
|
||||
image: erisamoe/cloudflared
|
||||
container_name: cloudflared
|
||||
command: --origincert /root/.cloudflared/cert.pem tunnel run --url http://nginx ${DOMAIN_NAME:?err}
|
||||
restart: unless-stopped
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
volumes:
|
||||
- './data/cloudflared/etc:/etc/cloudflared'
|
||||
- './data/cloudflared/home:/root'
|
||||
|
|
|
@ -2,7 +2,7 @@ version: "3.7"
|
|||
services:
|
||||
nginx:
|
||||
container_name: nginx
|
||||
restart: unless-stopped
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
hostname: ${DOMAIN_NAME:?err}
|
||||
volumes:
|
||||
- './http-root:/var/lib/nginx/html/http-root:ro'
|
||||
|
@ -35,11 +35,11 @@ services:
|
|||
- 22000:22000/tcp
|
||||
- 22000:22000/udp
|
||||
- 21027:21027/udp
|
||||
restart: unless-stopped
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
|
||||
certbot:
|
||||
container_name: certbot
|
||||
restart: always
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
volumes:
|
||||
- './data/acme-webroot:/srv/http/webroot'
|
||||
- './data/letsencrypt/etc:/etc/letsencrypt'
|
||||
|
|
4
run
4
run
|
@ -55,8 +55,8 @@ fi
|
|||
|
||||
if [ "$USE_TUNNELS" != "true" ]; then
|
||||
docker-compose -f docker-compose.yml pull
|
||||
docker-compose -f docker-compose.yml up ${COMPOSEFLAGS:-"-d"}
|
||||
docker-compose -f docker-compose.yml up ${COMPOSEFLAGS-"-d"}
|
||||
else
|
||||
docker-compose -f docker-compose-tunnels.yml pull
|
||||
docker-compose -f docker-compose-tunnels.yml up ${COMPOSEFLAGS:-"-d"}
|
||||
docker-compose -f docker-compose-tunnels.yml up ${COMPOSEFLAGS-"-d"}
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue