diff --git a/.drone-do.star b/.drone-do.star index 13b652a..3d89f24 100644 --- a/.drone-do.star +++ b/.drone-do.star @@ -12,8 +12,6 @@ def main(ctx): stackName, [ "docker service scale {name}_chat=1".format(name=stackName), - "docker service scale {name}_letsencrypt-drone=1".format(name=stackName), - "docker service scale {name}_letsencrypt-git=1".format(name=stackName), ] ) \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index fb591a4..e19ec27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: deploy: placement: constraints: [node.labels.com.sigyl.git-stack == yes] - replicas: 0 + replicas: 1 restart_policy: condition: any image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-git @@ -45,7 +45,7 @@ services: deploy: placement: constraints: [node.labels.com.sigyl.git-stack == yes] - replicas: 0 + replicas: 1 restart_policy: condition: any image: ${LOCAL_DOCKER_REGISTRY}letsencrypt-drone diff --git a/letsencrypt-nginx/conf/git.conf b/letsencrypt-nginx/conf/git.conf index ff35612..82d8d3a 100644 --- a/letsencrypt-nginx/conf/git.conf +++ b/letsencrypt-nginx/conf/git.conf @@ -119,7 +119,8 @@ # root /www/data; location ${GIT_LOCATION} { - proxy_pass ${PROXY_PASS}; + set ${DOLLAR}upstream ${PROXY_PASS}; + proxy_pass ${DOLLAR}upstream; } location ${BLOG_LOCATION} { proxy_set_header Host ${DOLLAR}http_host; @@ -127,7 +128,8 @@ proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto ${DOLLAR}scheme; proxy_buffering off; - proxy_pass ${BLOG_PROXY_PASS}; + set ${DOLLAR}upstream ${BLOG_PROXY_PASS}; + proxy_pass ${DOLLAR}upstream; } location ${PORTAINER_LOCATION} { proxy_set_header Host ${DOLLAR}http_host; @@ -135,7 +137,8 @@ proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto ${DOLLAR}scheme; proxy_buffering off; - proxy_pass ${PORTAINER_PROXY_PASS}; + set ${DOLLAR}upstream ${PORTAINER_PROXY_PASS}; + proxy_pass ${DOLLAR}upstream; } location ${CHAT_LOCATION}sockjs { @@ -181,7 +184,8 @@ proxy_redirect off; } location ${REMOTE_LOCATION}websocket-tunnel { - proxy_pass ${REMOTE_PROXY_PASS}websocket-tunnel; + set ${DOLLAR}upstream ${REMOTE_PROXY_PASS}websocket-tunnel; + proxy_pass ${DOLLAR}upstream; proxy_http_version 1.1; proxy_set_header Upgrade ${DOLLAR}http_upgrade; proxy_set_header Connection "Upgrade"; @@ -194,7 +198,8 @@ } location ${REMOTE_LOCATION}websocket-tunnel/ { - proxy_pass ${REMOTE_PROXY_PASS}websocket-tunnel/; + set ${DOLLAR}upstream ${REMOTE_PROXY_PASS}websocket-tunnel/; + proxy_pass ${DOLLAR}upstream; proxy_http_version 1.1; proxy_set_header Upgrade ${DOLLAR}http_upgrade; proxy_set_header Connection "Upgrade"; @@ -208,7 +213,8 @@ } location ${REMOTE_LOCATION} { - proxy_pass ${REMOTE_PROXY_PASS}; + set ${DOLLAR}upstream ${REMOTE_PROXY_PASS}; + proxy_pass ${DOLLAR}upstream; } }