mirror of
https://gitea.com/mcereda/oam.git
synced 2026-03-02 23:14:24 +00:00
chore(syncthing): review containerized service
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
# Refer https://github.com/syncthing/syncthing/blob/main/README-Docker.md
|
||||
volumes:
|
||||
config:
|
||||
data:
|
||||
services:
|
||||
syncthing:
|
||||
image: syncthing/syncthing:2.0.14
|
||||
container_name: syncthing
|
||||
hostname: ${HOSTNAME}
|
||||
environment:
|
||||
- PUID=0 # due to podman's rootless uid mapping
|
||||
- PGID=0 # due to podman's rootless gid mapping
|
||||
- STGUIADDRESS=0.0.0.0:8384
|
||||
volumes:
|
||||
- config:/var/syncthing/config:z
|
||||
- data:/var/syncthing/data
|
||||
# - ${HOME}/media:/var/syncthing/media
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -2,7 +2,7 @@
|
||||
# Refer https://github.com/syncthing/syncthing/blob/main/README-Docker.md
|
||||
services:
|
||||
syncthing:
|
||||
image: syncthing/syncthing:2.0.12
|
||||
image: syncthing/syncthing:2.0.14
|
||||
container_name: syncthing
|
||||
hostname: ${HOSTNAME}
|
||||
environment:
|
||||
|
||||
@@ -20,7 +20,7 @@ Intended to be a drop-in replacement for [Docker].
|
||||
|
||||
```sh
|
||||
# Install.
|
||||
apt install 'podman' 'podman-compose'
|
||||
apt install 'podman' 'podman-compose' 'uidmap'
|
||||
dnf install 'podman'
|
||||
pacman -S 'podman'
|
||||
zypper install 'podman'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Syncthing
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
Synchronizes files continuously between two or more computers.
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Configuration](#configuration)
|
||||
1. [Ignore files](#ignore-files)
|
||||
1. [Troubleshooting](#troubleshooting)
|
||||
1. [I forgot the password](#i-forgot-the-password)
|
||||
1. [Further readings](#further-readings)
|
||||
@@ -11,19 +11,10 @@
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Installation.
|
||||
sudo apt install 'syncthing'
|
||||
brew install --cask 'syncthing'
|
||||
sudo zypper install 'syncthing'
|
||||
<details>
|
||||
<summary>Setup</summary>
|
||||
|
||||
# Startup.
|
||||
syncthing
|
||||
syncthing --gui-address '0.0.0.0:8384' --no-default-folder
|
||||
systemctl --user start 'syncthing.service'
|
||||
```
|
||||
|
||||
## Configuration
|
||||
Configuration files:
|
||||
|
||||
| OS | Path |
|
||||
| -------- | -------------------------------------------------------------- |
|
||||
@@ -31,11 +22,36 @@ systemctl --user start 'syncthing.service'
|
||||
| Mac OS X | `$HOME/Library/Application Support/Syncthing` |
|
||||
| Windows | `%LOCALAPPDATA%\Syncthing` |
|
||||
|
||||
```sh
|
||||
# Installation.
|
||||
sudo apt install 'syncthing'
|
||||
brew install --cask 'syncthing'
|
||||
sudo zypper install 'syncthing'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Usage</summary>
|
||||
|
||||
```sh
|
||||
# Startup.
|
||||
syncthing
|
||||
syncthing --gui-address '0.0.0.0:8384' --no-default-folder
|
||||
systemctl --user start 'syncthing.service'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Ignore files
|
||||
|
||||
Refer to [Documentation / Ignoring Files].
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### I forgot the password
|
||||
|
||||
Remove the entry under `gui.password` in the [configuration file][configuration]:
|
||||
Remove the entry under `gui.password` in the [configuration file][documentation / syncthing configuration]:
|
||||
|
||||
```sh
|
||||
# With XMLStarlet
|
||||
@@ -47,25 +63,25 @@ Then enter the settings on the host and set a new password.
|
||||
## Further readings
|
||||
|
||||
- [Website]
|
||||
- [Codebase]
|
||||
|
||||
### Sources
|
||||
|
||||
- [The GUI listen address]
|
||||
- [File versioning]
|
||||
- [Configuration]
|
||||
- [Documentation]
|
||||
|
||||
<!--
|
||||
References
|
||||
Reference
|
||||
═╬═Time══
|
||||
-->
|
||||
|
||||
<!-- In-article sections -->
|
||||
[configuration]: #configuration
|
||||
|
||||
<!-- Knowledge base -->
|
||||
<!-- Files -->
|
||||
<!-- Upstream -->
|
||||
[configuration]: https://docs.syncthing.net/users/config.html
|
||||
[file versioning]: https://docs.syncthing.net/users/versioning.html
|
||||
[the gui listen address]: https://docs.syncthing.net/users/guilisten.html
|
||||
[website]: https://syncthing.net/
|
||||
[Codebase]: https://github.com/syncthing/syncthing
|
||||
[Documentation / Ignoring Files]: https://docs.syncthing.net/users/ignoring
|
||||
[Documentation / Syncthing Configuration]: https://docs.syncthing.net/users/config.html
|
||||
[Documentation]: https://docs.syncthing.net
|
||||
[Website]: https://syncthing.net/
|
||||
|
||||
<!-- In-article sections -->
|
||||
[further readings]: #further-readings
|
||||
<!-- Others -->
|
||||
|
||||
Reference in New Issue
Block a user