-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Bug report) Docker Compose file needs to be updated #2239
Comments
Solution: |
Hi, I'm not sure what exactly needs to be fixed. Would you mind creating a PR? Thanks. |
No idea, sorry. I'm just reporting a bug. For the data volume to actually work and have any data inside it I have to |
I see. This file was contributed externally as a sort of example, maybe it's missing e.g. the exact directory mapping which needs to be filled by the end-user. If the file is more confusing than helpful I might just delete it. |
You can't save right now any file inside the mapped folder "trilium" /data. There is a bug somewhere. |
I'm syncing my desktop Trilium instance with a Docker-based Trilium instance on a remote server. The specified volume ( My docker-compose config:
Are you sure that the directories & permissions specified are valid in your specific setup? |
i have the same issue, when creating a new install on docker, logs say it has no write perms.. |
Thank you for Trilium, it is one the best note taking apps I have ever seen, really awesome. I just want to add in here, that Looking at start-docker.sh #!/bin/sh
[[ ! -z "${USER_UID}" ]] && usermod -u ${USER_UID} node || echo "No USER_UID specified, leaving 1000"
[[ ! -z "${USER_GID}" ]] && groupmod -g ${USER_GID} node || echo "No USER_GID specified, leaving 1000"
chown -R node:node /home/node
exec su-exec node node ./src/www The only chown in the containers code that doesn't run after In my mind I believe what is happening in number of open issues, is |
This shouldn't matter - The container is starting as root user, but changing immediately to run under |
Thanks for the quick reply, I thought that The compose below is an example of what I (and I think a few others) we trying to do with version: '2.1'
services:
trilium:
image: zadam/trilium
restart: always
environment:
- TRILIUM_DATA_DIR=/data
ports:
- "8080:8080"
volumes:
- trilium:/data
volumes:
trilium: edit: I just realized this example was literally in the first post. doh! |
So I tested the docker-compose and I didn't figure out where it actually stores the data. I changed the config so that it by default uses |
Thanks so much, was plenty easy to work around, but might help some people. Also thanks again for the awesome app. I've looked for years for replacement to OneNote this app is it. |
I realise this issue is now fixed, as per the PR above, but I saw this bug mentioned in the release notes for 0.61.12 and got puzzled - the following docker-compose file snippet has worked for me since I started using Trilium - around June 2023, I think.
And the directory structure that created:
Is this not the right way to be setting this up? PS. I have the container named the way it is, as I plan to set up more containers for others in the family - this is the only way I can think of to do it easily, as trilium doesn't do users :) |
I think you're good. I came here through the same path of "I use docker compose and based it off the example, do I need to fix something?". The default configuration used to put the trilium data into a volume. Now, if If you have a working configuration, no action is required.
FWIW, this is my setup: traefik routing to several trilium instances by path e.g.
|
Preflight Checklist
Trilium Version
latest
What operating system are you using?
Other Linux
What is your setup?
Local (no sync)
Operating System Version
Ubuntu live server 20.10
Expected Behavior
To have data in data-Folder.
Neither
- TRILIUM_DATA_DIR=/data
norvolumes: - trilium:/data
does anything meaningful. The data folder / volume is empty and recreated every time the docker image is recreated -> It stores the data inside the container itself (probably)Actual Behavior
Empty data folder, data is recreated everytime docker image is recreated -> data is probably stored inside the docker container itself.
The text was updated successfully, but these errors were encountered: