From 809f592de17fb0d6da20b98ceed66bbcb8d53c3c Mon Sep 17 00:00:00 2001 From: BA1001 Date: Thu, 1 Dec 2022 22:37:52 +0100 Subject: [PATCH] Deploy website --- .../system/docker-compose-website.service | 17 +++++++++++++++++ opt/website/docker-compose.yml | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 etc/systemd/system/docker-compose-website.service create mode 100644 opt/website/docker-compose.yml diff --git a/etc/systemd/system/docker-compose-website.service b/etc/systemd/system/docker-compose-website.service new file mode 100644 index 0000000..3501b4b --- /dev/null +++ b/etc/systemd/system/docker-compose-website.service @@ -0,0 +1,17 @@ +[Unit] +Description=Docker Compose Website Application Service +Requires=docker.service +After=docker.service + +[Service] +WorkingDirectory=/opt/website +ExecStart=/usr/bin/docker-compose --project-name website up +ExecStop=/usr/bin/docker-compose --project-name website down +TimeoutStartSec=0 +Restart=on-failure +StartLimitIntervalSec=60 +StartLimitBurst=3 + +[Install] +WantedBy=multi-user.target + diff --git a/opt/website/docker-compose.yml b/opt/website/docker-compose.yml new file mode 100644 index 0000000..bdfaba2 --- /dev/null +++ b/opt/website/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3.8" + +services: + website: + container_name: website + image: jilits/website:0.1.0 + restart: unless-stopped + ports: + - 8000:1313