From dcb05bf0d4721a7012075e796e96253e1d4cd838 Mon Sep 17 00:00:00 2001 From: BA1001 Date: Sat, 3 Dec 2022 00:27:52 +0100 Subject: [PATCH] Add Syncthing --- .../system/docker-compose-syncthing.service | 17 +++++++++++++++++ opt/syncthing/docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 etc/systemd/system/docker-compose-syncthing.service create mode 100644 opt/syncthing/docker-compose.yml diff --git a/etc/systemd/system/docker-compose-syncthing.service b/etc/systemd/system/docker-compose-syncthing.service new file mode 100644 index 0000000..b9c2fd9 --- /dev/null +++ b/etc/systemd/system/docker-compose-syncthing.service @@ -0,0 +1,17 @@ +[Unit] +Description=Docker Compose Syncthing Application Service +Requires=docker.service +After=docker.service + +[Service] +WorkingDirectory=/opt/syncthing +ExecStart=/usr/bin/docker-compose --project-name syncthing up +ExecStop=/usr/bin/docker-compose --project-name syncthing down +TimeoutStartSec=0 +Restart=on-failure +StartLimitIntervalSec=60 +StartLimitBurst=3 + +[Install] +WantedBy=multi-user.target + diff --git a/opt/syncthing/docker-compose.yml b/opt/syncthing/docker-compose.yml new file mode 100644 index 0000000..02f5127 --- /dev/null +++ b/opt/syncthing/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3" +services: + syncthing: + image: syncthing/syncthing:1.22.2 + restart: unless-stopped + network_mode: host + hostname: gergesa + environment: + - PUID=1000 + - PGID=1000 + - STGUIADDRESS= + volumes: + - syncthing:/var/syncthing + +volumes: + syncthing: