mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #784] DB wont start with Volume on NFS Mount #662
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#662
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Blackraz0r on GitHub (Dec 19, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/784
Checklist
jc21/nginx-proxy-manager:latestdocker imagelatest docker images ( i created the compose file like on the website described)
2.7.1
Compose file:
i run my docker host via ubuntu 16.04 and my NAS (NFS-MOUNT) is a synology one.
this is the nfs configuration on the nas:
https://i.imgur.com/74YYup5.png
the ip is the ip of the docker host.
so from the side of the nas nfs works ( other containers work too)
Describe the bug
when i login it shows "Bad Gateway"
https://i.imgur.com/Bt1w8EO.png
To Reproduce
create a new folder on the nas:
sudo mkdir /mnt/NAS/docker/volumes/NPMcreate compose file
sudo nano docker-compose.ymlpaste the contents from above
run the stack
sudo docker-compose up -dLog into NPM via hostIP:81
get bad gateweay like in the screen above
Expected behavior
i can normally login
Screenshots
see above situational
Operating System
Ubuntu16.04 / Docker 19.03.12 / docker-compose version 1.25.5, build 8a1c60f6
Additional context
here comes the fun part.
the database seems to use a user that does no have permission of the nfs mount.
https://i.imgur.com/fqVOGuv.png
in this case the user is "systemd-network"
so how can i force the database to use root ?
because this seems to be problematic when the db want to start somehow:
this is a repeating pattern
and the npm container is like this:
it waits on the db i guess?
anyway to fix that issue with nfs mounts ?
i reall dont want to story my file nonredudnant on a vm. i mean it violates thhe whole purpose of a nas
thank you in advance guys!
@ahgraber commented on GitHub (Feb 8, 2021):
Using recent versions (>=3.2, I think?) of docker-compose, you can create docker volumes that point to the NFS share and use them as the mountpoints under services. You don't even have to mount the nfs volume on the docker host -- docker will manage it all!
limited compose example:
in
o:you're providing mount options:rw for read/write,
soft allows I/O interruptions (i.e., doesn't crash your container if there's a network blip)
nolock allows multiple readers
in
device:you're providing the specific path to the share on your nas. Might be ":/db" or might be ":/path/to/share"Ref: https://stackoverflow.com/questions/45282608/how-to-directly-mount-nfs-share-volume-in-container-using-docker-compose-v3