Merge pull request #1 from heywoodlh/master

Docker image
This commit is contained in:
vorotamoroz 2022-05-03 07:16:53 +09:00 committed by GitHub
commit 7d9f977b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 1 deletions

13
docker/Dockerfile Normal file
View 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
View 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
```

View File

@ -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.