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: