add storage to docs, fixes #22.

This commit is contained in:
Miroslav Šedivý
2021-07-17 20:27:52 +02:00
parent 2406694c04
commit f51cbb1470
3 changed files with 58 additions and 0 deletions
+8
View File
@@ -98,6 +98,14 @@ docker-compose pull
docker-compose up -d
```
### Enable storage
You might have encountered this error:
> Mounts cannot be specified because storage is diabled or unavailable.
If you didn't specify storage yet, you can do it using [this tutorial](./docs/storage.md).
### Roadmap:
- [x] add GUI
- [x] add HTTPS support
+50
View File
@@ -0,0 +1,50 @@
# Storage for neko-rooms
This needs to be specified in docker-compose:
```diff
neko-rooms:
image: "m1k1o/neko-rooms:latest"
restart: "unless-stopped"
environment:
- "TZ"
- "NEKO_ROOMS_EPR"
- "NEKO_ROOMS_NAT1TO1"
- "NEKO_ROOMS_TRAEFIK_DOMAIN"
- "NEKO_ROOMS_TRAEFIK_ENTRYPOINT"
- "NEKO_ROOMS_TRAEFIK_NETWORK"
- "NEKO_ROOMS_INSTANCE_URL=http://${NEKO_ROOMS_TRAEFIK_DOMAIN}:8080/" # external URL
+ - "NEKO_ROOMS_STORAGE_ENABLED=true"
+ - "NEKO_ROOMS_STORAGE_INTERNAL=/data"
+ - "NEKO_ROOMS_STORAGE_EXTERNAL=/opt/neko-rooms/data"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
+ - "/opt/neko-rooms/data:/data"
labels:
- "traefik.enable=true"
- "traefik.http.services.neko-rooms-frontend.loadbalancer.server.port=8080"
- "traefik.http.routers.neko-rooms.entrypoints=${NEKO_ROOMS_TRAEFIK_ENTRYPOINT}"
- "traefik.http.routers.neko-rooms.rule=Host(`${NEKO_ROOMS_TRAEFIK_DOMAIN}`)"
```
Where:
- `NEKO_ROOMS_STORAGE_INTERNAL` is the directory inside container.
- `NEKO_ROOMS_STORAGE_EXTERNAL` is the directory outside container.
- `"/opt/neko-rooms/data:/data"` is volume mount.
Please note, that **neko-rooms** must be aware of external storage path, as it is going to mount it to the room itself. That needs to be available to **neko-rooms** as well, in order to manage that folder.
Inside storage path (e.g. `/opt/neko-rooms/data`) there will be available these mountpoints:
- `/opt/neko-rooms/data/`**`rooms/<room name>/`** where will be stored private room data.
- `/opt/neko-rooms/data/`**`templates/`** where templates. will be accessible.
## How can it be used?
You can mount e.g. browser policies and this way customize browser.
You can always refer to [google-chrome dockerfile](https://github.com/m1k1o/neko/blob/1800d077d8138bdb23c25028bf4201a0469f91aa/.m1k1o/google-chrome/Dockerfile). In this case, policies are mounted to `/etc/opt/chrome/policies/managed/policies.json`. So you can mount custom file to this location.
For this purpose, template path is corect. You can then store your policies file to e.g. `/opt/neko-rooms/data/templates/policies.json` and have it mounted.
![storage](storage.png)
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB