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