diff --git a/unit-files/network-frontend-web.service b/unit-files/network-frontend-web.service new file mode 100755 index 0000000000000000000000000000000000000000..bcb29360975deff1763e5b0145b7f63e5b9d3862 --- /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/s@.service b/unit-files/s@.service index fd4cfdd630fd06a1376c3fca25500713bb5785a2..fd2793b6a91768be2cc0c36c44628998d287af49 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 old mode 100644 new mode 100755 index bead8bf1428d27639e57ae0af301daac0990d1a8..35c068bfedaec9064f6df7f356afa1bbeb00a831 --- 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=/usr/bin/docker-compose up +ExecStop=/usr/bin/docker-compose stop [Install] WantedBy=multi-user.target diff --git a/unit-files/web-net.service b/unit-files/web-net.service deleted file mode 100644 index f45effd8309a1db003bde25ce06887ef55e24c34..0000000000000000000000000000000000000000 --- 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