Temp created as root
l-maciej opened this issue · 4 comments
Hi
I'm using docker-compose to start service :
version: "2.1"
services:
wikmd:
image: linbreux/wikmd:latest
container_name: wikmd
environment:
- PUID=1001
- PGID=1001
- TZ=Europe/Warsaw
- WIKI_DIRECTORY=/pages
- HOMEPAGE=homepage.md
- HOMEPAGE_TITLE=Homepage
- SYNCH_WITH_REMOTE=1
- REMOTE_URL="XXXXX"
- GIT_USER=wikmdSYnc
- GIT_EMAIL=wikmd@null.lan
- MAIN_BRANCH_NAME=workingcopy
volumes:
- pages:/pages
ports:
- 5000:5000
restart: unless-stopped
volumes:
pages:
After docker-compose up two errors are showing up:
/wiki is still used as default or just wiki tries to empty out folder. Application is trying to move data from /wiki it to non-existing temp folder not permitted to user with GID 1001 (non-root user on host machine) -> it causes loads of logs and machine load
/pages is created and correct permission are added
Alright thanks for noticing and the detailed instructions. I think the is because the wiki folder is hardcoded here and this should be an environment variable.
I'll fix it asap. Does it work when you do not specify the directory?
version: "2.1"
services:
wikmd:
image: linbreux/wikmd:latest
container_name: wikmd
environment:
- PUID=1001
- PGID=1001
- TZ=Europe/Warsaw
- WIKI_DIRECTORY=/pages
- HOMEPAGE=homepage.md
- HOMEPAGE_TITLE=Homepage
- SYNCH_WITH_REMOTE=1
- REMOTE_URL="XXXXX"
- GIT_USER=wikmdSYnc
- GIT_EMAIL=wikmd@null.lan
- MAIN_BRANCH_NAME=workingcopy
volumes:
- pages:/pages
ports:
- 5000:5000
restart: unless-stopped
volumes:
pages:
Causes same issue with moving data to temp folder
Maybe different init method when using sync with remote is enabled - just remove all examples since data will be pulled from git anyway
Hi @l-maciej,
Why don't you simply mount your volume under /wiki
(and remove WIKI_DIRECTORY
)?
...
volumes:
- pages:/wiki
...
As for the permission issue in /tmp
, a possible fix could be to change the permission, e.g. changing this line as
chown abc:abc /var/log/wikmd.log /tmp
Without having tested it I'm not sure if it would cause other issues tho.