From 449d8dd92859597511f823adce275344fec0bb56 Mon Sep 17 00:00:00 2001 From: "ali.hh.ramadhan@gmail.com" Date: Sun, 28 Mar 2021 12:23:44 -0400 Subject: [PATCH 1/2] Add ACME volume for nginx-proxy-letsencrypt container --- docker-compose.prod.yml | 4 +++- docker-compose.staging.yml | 4 +++- docker-compose.yml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 90c1175..5cbc000 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: nginx-proxy-letsencrypt: @@ -10,6 +10,7 @@ services: - certs:/etc/nginx/certs - html:/usr/share/nginx/html - vhost:/etc/nginx/vhost.d + - acme:/etc/acme.sh depends_on: - nginx-proxy @@ -68,3 +69,4 @@ volumes: certs: html: vhost: + acme: diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index 8bd5855..4e9d1d5 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: nginx-proxy-letsencrypt: @@ -10,6 +10,7 @@ services: - certs:/etc/nginx/certs - html:/usr/share/nginx/html - vhost:/etc/nginx/vhost.d + - acme:/etc/acme.sh depends_on: - nginx-proxy @@ -68,3 +69,4 @@ volumes: certs: html: vhost: + acme: diff --git a/docker-compose.yml b/docker-compose.yml index ea66358..2940f54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: django: From 6be64d5015b9fdc5bc1a27414857710205e857f1 Mon Sep 17 00:00:00 2001 From: "ali.hh.ramadhan@gmail.com" Date: Sun, 28 Mar 2021 18:08:06 -0400 Subject: [PATCH 2/2] Only continue if things are fine --- update_production.bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/update_production.bash b/update_production.bash index 146735b..421b9c3 100644 --- a/update_production.bash +++ b/update_production.bash @@ -1,8 +1,8 @@ #!/bin/bash -git pull -docker pull projectlovelace/lovelace-engine -docker-compose -f docker-compose.prod.yml build -docker-compose -f docker-compose.prod.yml down -docker-compose -f docker-compose.prod.yml up --detach +git pull && \ +docker pull projectlovelace/lovelace-engine && \ +docker-compose -f docker-compose.prod.yml build && \ +docker-compose -f docker-compose.prod.yml down && \ +docker-compose -f docker-compose.prod.yml up --detach && \ docker-compose -f docker-compose.prod.yml exec django python manage.py collectstatic --no-input