Added syncthing files
parent
54bfba2e30
commit
5200155770
|
@ -0,0 +1,26 @@
|
|||
FROM archlinux
|
||||
LABEL maintiner="Mark <mark@betalupi.com>"
|
||||
|
||||
# Create users and groups.
|
||||
# Make sure uids and gids are the same on the host!
|
||||
#
|
||||
# Syncthing should be installed AFTER users are created.
|
||||
# The package will create its own syncthing user if one does not exist.
|
||||
# We need to do it manually, to control uid and gid.
|
||||
|
||||
RUN groupadd -g 1000 syncthing && \
|
||||
useradd -g 1000 -u 1000 syncthing -d /stdata && \
|
||||
pacman -Fyy --noconfirm && \
|
||||
pacman -Syu --noconfirm && \
|
||||
pacman -S --noconfirm syncthing syncthing-relaysrv
|
||||
|
||||
VOLUME /syncthing
|
||||
|
||||
# Syncthing
|
||||
EXPOSE 8384
|
||||
|
||||
# Relay
|
||||
EXPOSE 22067
|
||||
|
||||
COPY start.sh /start.sh
|
||||
ENTRYPOINT ["/bin/bash", "start.sh"]
|
|
@ -0,0 +1,15 @@
|
|||
version: "2"
|
||||
|
||||
services:
|
||||
syncserver:
|
||||
build: ./build
|
||||
container_name: syncthing
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
- "./stdata:/stdata"
|
||||
- "./stconfig:/stconfig"
|
||||
# host:container
|
||||
ports:
|
||||
- "8384:8384"
|
||||
- "22067:22067"
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Files go here
|
||||
mkdir /stdata
|
||||
|
||||
|
||||
|
||||
# Configs go here
|
||||
mkdir /stconfig
|
||||
mkdir /stconfig/config
|
||||
|
||||
chown -R syncthing:syncthing /stdata
|
||||
chmod -R 774 /stdata
|
||||
|
||||
chown -R syncthing:syncthing /stconfig
|
||||
chmod -R 774 /stconfig
|
||||
|
||||
su - syncthing -c '
|
||||
cd /stconfig
|
||||
syncthing-relaysrv \
|
||||
-pools="" \
|
||||
-keys="/stconfig" \
|
||||
-listen=":22067" \
|
||||
-ping-interval="30s" \
|
||||
-protocol="tcp4" \
|
||||
-provided-by="Betalupi" \
|
||||
-status-srv=""' &
|
||||
|
||||
su - syncthing -c '
|
||||
syncthing \
|
||||
-gui-address=0.0.0.0:8384 \
|
||||
-home="/stconfig/config" \
|
||||
--no-browser
|
||||
'
|
||||
|
||||
|
Loading…
Reference in New Issue