File tree Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 1
1
version : ' 3'
2
2
services :
3
- nginx :
3
+ nginx-web :
4
4
image : nginx
5
5
labels :
6
6
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy : " true"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ #
4
+ # This scrip update the web proxy without downtime
5
+ #
6
+ # Source: https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion
7
+ #
8
+
9
+ # 1. Check if .env file exists
10
+ if [ -e .env ]; then
11
+ source .env
12
+ else
13
+ echo
14
+ echo " Please set up your .env file before starting your enviornment."
15
+ echo
16
+ exit 1
17
+ fi
18
+
19
+ # 2. Update your repo
20
+ git pull
21
+ git checkout master
22
+
23
+ # 3. Check if your env files has the same line numbers
24
+ if [ " $( wc -l .env | cut -f1 -d' ' ) " != " $( wc -l .env.sample | cut -f1 -d' ' ) " ]; then
25
+ echo
26
+ echo " The sample .env are different from the your current .env file."
27
+ echo " Please update your .env file to continue."
28
+ echo " It must has the same lines of the sample env file."
29
+ echo
30
+ echo " If you keep receiving this message please check the number of line of both files"
31
+ echo
32
+ fi
33
+
34
+ # 3. Download the latest version of nginx.tmpl
35
+ curl https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl > nginx.tmpl
36
+
37
+ # 4. Update containers without downtime
38
+ docker-compose up -d --no-deps --build nginx-web
39
+ docker-compose up -d --no-deps --build nginx-gen
40
+ docker-compose up -d --no-deps --build nginx-letsencrypt
41
+
42
+ exit 0
You can’t perform that action at this time.
0 commit comments