mirror of
https://github.com/eliasstepanik/filesystem-livesync.git
synced 2026-01-11 13:38:30 +00:00
commit
7d9f977b58
13
docker/Dockerfile
Normal file
13
docker/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM node:17.9.0-bullseye
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN npm install \
|
||||||
|
&& mv /app/dat /data \
|
||||||
|
&& ln -s /data /app/dat ## Assumes /data will store configuration and vaults
|
||||||
|
|
||||||
|
VOLUME /data
|
||||||
|
|
||||||
|
ENTRYPOINT ["npm", "run", "dev"]
|
||||||
45
docker/README.md
Normal file
45
docker/README.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
## Build the image:
|
||||||
|
|
||||||
|
From the root directory of the [vrtmrz/filesystem-livesync](https://github.com/vrtmrz/filesystem-livesync) repository run the following to build the image:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build -t filesystem-livesync -f docker/Dockerfile .
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configure the image:
|
||||||
|
|
||||||
|
Assuming a folder at `/tmp/data` was going to store your config and vaults, write the following to `/tmp/data/config.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"config_1": {
|
||||||
|
"server": {
|
||||||
|
"uri": "http://example-uri/private1_vault",
|
||||||
|
"auth": {
|
||||||
|
"username": "couchdb_username",
|
||||||
|
"password": "couchdb_password",
|
||||||
|
"passphrase": "mypassphrase" // Remove if no passphrase is set for Vault
|
||||||
|
},
|
||||||
|
"initialScan": true
|
||||||
|
},
|
||||||
|
"local": {
|
||||||
|
"path": "/data/vault1",
|
||||||
|
"initialScan": true
|
||||||
|
},
|
||||||
|
"auto_reconnect": true,
|
||||||
|
"sync_on_connect": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run the image:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it --rm -v /tmp/data:/data filesystem-livesync
|
||||||
|
```
|
||||||
|
|
||||||
|
If you would like to be able to edit files from your host running Docker, it is recommended to set the `CHOKIDAR_USEPOLLING` environment variable to equal `1`:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it --rm -v /tmp/data:/data -e CHOKIDAR_USEPOLLING=1 filesystem-livesync
|
||||||
|
```
|
||||||
@ -28,7 +28,7 @@ The configuration file consists of the following structure.
|
|||||||
"auth": {
|
"auth": {
|
||||||
"username": "username_of_private_vault",
|
"username": "username_of_private_vault",
|
||||||
"password": "password_of_private_vault",
|
"password": "password_of_private_vault",
|
||||||
"passphrase": "passphrase_of_private_vault"
|
"passphrase": "passphrase_of_private_vault" // Remove if no passphrase is set for your vault
|
||||||
},
|
},
|
||||||
"path": "shared/", // All documents under this path will synchronized.
|
"path": "shared/", // All documents under this path will synchronized.
|
||||||
"initialScan": false // If you enable this, all server files will be synchronized to local storage once when daemon has been started.
|
"initialScan": false // If you enable this, all server files will be synchronized to local storage once when daemon has been started.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user