mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-25 11:03:07 +00:00
add docker: syncthing/syncthing
This commit is contained in:
parent
8282c5823c
commit
007585dc1e
5 changed files with 72 additions and 0 deletions
35
docs/applications/syncthing.md
Normal file
35
docs/applications/syncthing.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Syncthing: Open Source Continuous File Synchronisation
|
||||
|
||||
Homepage: [https://syncthing.net/](https://syncthing.net/)
|
||||
Github: [https://github.com/syncthing/syncthing](https://github.com/syncthing/syncthing)
|
||||
Docker: [https://hub.docker.com/r/syncthing/syncthing](https://hub.docker.com/r/syncthing/syncthing)
|
||||
|
||||
Syncthing is a continuous file synchronization program. It synchronizes files
|
||||
between two or more computers. It strives to fulfill the goals below in summary.
|
||||
Syncthing should be:
|
||||
|
||||
1. Safe From Data Loss
|
||||
2. Secure Against Attackers
|
||||
3. Easy to Use
|
||||
4. Automatic
|
||||
5. Universally Available
|
||||
6. For Individuals
|
||||
7. For eveything else see the goals document
|
||||
|
||||
## Usage
|
||||
|
||||
Set `syncthing_enabled: true` in your `group_vars/all.yml` file.
|
||||
|
||||
## Specific Configuration
|
||||
|
||||
Open the web interface at :8384 to configure.
|
||||
|
||||
The tasks/syncthing.yml sets
|
||||
```yaml
|
||||
env:
|
||||
STGUIADDRESS: ""
|
||||
```
|
||||
which disables admin GUI access from anywhere except localhost. You can either
|
||||
remove this (at which point it is visible to your whole network), or use
|
||||
Traefik. In either case you should consider setting an admin password in the
|
||||
syncthing GUI.
|
|
@ -7,6 +7,8 @@ By default, applications can be found on the ports listed below.
|
|||
| Couchpotato | 5050 | |
|
||||
| Bitwarden "hub" | 3012 | Web Not. |
|
||||
| Bitwarden | 19080 | HTTP |
|
||||
| Syncthing admin | 8384 | HTTP |
|
||||
| Syncthing P2P | 22000 | |
|
||||
| Duplicati | 8200 | |
|
||||
| Emby | 8096 | HTTP |
|
||||
| Emby | 8920 | HTTPS |
|
||||
|
|
|
@ -68,6 +68,9 @@ thelounge_enabled: false
|
|||
# Password Management
|
||||
bitwarden_enabled: false
|
||||
|
||||
# Syncthing
|
||||
syncthing_enabled: false
|
||||
|
||||
# Finance
|
||||
firefly_enabled: false
|
||||
|
||||
|
@ -550,6 +553,12 @@ bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321
|
|||
# Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden
|
||||
bitwarden_allow_signups: false
|
||||
|
||||
###
|
||||
### Syncthing
|
||||
###
|
||||
syncthing_available_externally: "false"
|
||||
syncthing_data_directory: "{{ samba_shares_root }}/syncthing"
|
||||
|
||||
###
|
||||
### Firefly
|
||||
###
|
||||
|
|
4
nas.yml
4
nas.yml
|
@ -160,6 +160,10 @@
|
|||
when: (bitwarden_enabled | default(False))
|
||||
tags: bitwarden
|
||||
|
||||
- import_tasks: tasks/syncthing.yml
|
||||
when: (syncthing_enabled | default(False))
|
||||
tags: syncthing
|
||||
|
||||
- import_tasks: tasks/nzbget.yml
|
||||
when: (nzbget_enabled | default(False))
|
||||
tags: nzbget
|
||||
|
|
22
tasks/syncthing.yml
Normal file
22
tasks/syncthing.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
- name: Create Syncthing Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ syncthing_data_directory }}"
|
||||
|
||||
- name: Syncthing Docker Container
|
||||
docker_container:
|
||||
name: syncthing
|
||||
image: syncthing/syncthing:latest
|
||||
pull: true
|
||||
network_mode: host
|
||||
volumes:
|
||||
- "{{ syncthing_data_directory }}:/var/syncthing:rw"
|
||||
env:
|
||||
STGUIADDRESS: ""
|
||||
labels:
|
||||
traefik.web.frontend.rule: "Host:syncthing.{{ ansible_nas_domain }}"
|
||||
traefik.enable: "{{ syncthing_available_externally }}"
|
||||
traefik.port: "8384"
|
||||
restart_policy: unless-stopped
|
Loading…
Reference in a new issue