From afc8541135d6d84028065e23d617325f3b2d9f1d Mon Sep 17 00:00:00 2001 From: ecobytes collective Date: Tue, 31 Oct 2017 17:47:18 +0100 Subject: [PATCH 1/4] rename frontend network --- unit-files/network-frontend-web.service | 11 +++++++++++ unit-files/web-net.service | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 unit-files/network-frontend-web.service delete mode 100644 unit-files/web-net.service diff --git a/unit-files/network-frontend-web.service b/unit-files/network-frontend-web.service new file mode 100644 index 0000000..5673ae5 --- /dev/null +++ b/unit-files/network-frontend-web.service @@ -0,0 +1,11 @@ +[Unit] +Description=Lifecycle of a frontend web network +Requires=docker.service +After=docker.service +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/usr/bin/docker network create frontend_web +ExecStop=/usr/bin/docker network rm frontend_web +[Install] +WantedBy=local.target diff --git a/unit-files/web-net.service b/unit-files/web-net.service deleted file mode 100644 index f45effd..0000000 --- a/unit-files/web-net.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Create lb_web network -Requires=docker.service -After=docker.service -[Service] -Type=oneshot -RemainAfterExit=true -ExecStart=/usr/bin/docker network create lb_web -ExecStop=/usr/bin/docker network rm lb_web -[Install] -WantedBy=local.target -- GitLab From ccb7a28620fb11e1e7da5d63be71f92732d1ecdc Mon Sep 17 00:00:00 2001 From: ecobytes collective Date: Tue, 31 Oct 2017 17:48:03 +0100 Subject: [PATCH 2/4] update docker compose location on debian-based systems --- unit-files/s@.service | 6 +++--- unit-files/u@.service | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/unit-files/s@.service b/unit-files/s@.service index fd4cfdd..fd2793b 100644 --- a/unit-files/s@.service +++ b/unit-files/s@.service @@ -15,9 +15,9 @@ TimeoutStopSec=15 EnvironmentFile=-/system/%i/env Environment=HOSTNAME=%H WorkingDirectory=/system/%i/ -ExecStartPre=-/opt/bin/docker-compose rm -f -ExecStart=/bin/bash -euxc "/opt/bin/docker-compose up" -ExecStop=/opt/bin/docker-compose stop +ExecStartPre=-/usr/bin/docker-compose rm -f +ExecStart=/bin/bash -euxc "/usr/bin/docker-compose up" +ExecStop=/usr/bin/docker-compose stop [Install] WantedBy=multi-user.target diff --git a/unit-files/u@.service b/unit-files/u@.service index bead8bf..b820645 100644 --- a/unit-files/u@.service +++ b/unit-files/u@.service @@ -15,9 +15,9 @@ TimeoutStopSec=15 EnvironmentFile=-/data/domains/%i/env Environment=HOSTNAME=%H WorkingDirectory=/data/domains/%i/ -ExecStartPre=-/opt/bin/docker-compose rm -f -ExecStart=/bin/bash -euxc "VIRTUAL_HOST=%i,www.%i /opt/bin/docker-compose up" -ExecStop=/opt/bin/docker-compose stop +ExecStartPre=-/usr/bin/docker-compose rm -f +ExecStart=/bin/bash -euxc "VIRTUAL_HOST=%i,www.%i /usr/bin/docker-compose up" +ExecStop=/usr/bin/docker-compose stop [Install] WantedBy=multi-user.target -- GitLab From 440ea68b7faaf18da204e98b21c5c5626b902ea6 Mon Sep 17 00:00:00 2001 From: ecobytes collective Date: Sat, 9 Dec 2017 17:05:03 +0100 Subject: [PATCH 3/4] network naming stabilisation --- unit-files/network-frontend-web.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 unit-files/network-frontend-web.service diff --git a/unit-files/network-frontend-web.service b/unit-files/network-frontend-web.service old mode 100644 new mode 100755 index 5673ae5..bcb2936 --- a/unit-files/network-frontend-web.service +++ b/unit-files/network-frontend-web.service @@ -5,7 +5,7 @@ After=docker.service [Service] Type=oneshot RemainAfterExit=true -ExecStart=/usr/bin/docker network create frontend_web -ExecStop=/usr/bin/docker network rm frontend_web +ExecStart=/usr/bin/docker network create frontend-web +ExecStop=/usr/bin/docker network rm frontend-web [Install] WantedBy=local.target -- GitLab From 09876ee90d03784ce8c299299a28ce97b44261ef Mon Sep 17 00:00:00 2001 From: ecobytes collective Date: Sat, 9 Dec 2017 17:05:53 +0100 Subject: [PATCH 4/4] be explicit about VIRTUAL_HOSTs in .env via .yml, don't assume www --- unit-files/u@.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 unit-files/u@.service diff --git a/unit-files/u@.service b/unit-files/u@.service old mode 100644 new mode 100755 index b820645..35c068b --- a/unit-files/u@.service +++ b/unit-files/u@.service @@ -16,7 +16,7 @@ EnvironmentFile=-/data/domains/%i/env Environment=HOSTNAME=%H WorkingDirectory=/data/domains/%i/ ExecStartPre=-/usr/bin/docker-compose rm -f -ExecStart=/bin/bash -euxc "VIRTUAL_HOST=%i,www.%i /usr/bin/docker-compose up" +ExecStart=/usr/bin/docker-compose up ExecStop=/usr/bin/docker-compose stop [Install] -- GitLab