Skip to content
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

Wiki misses the app folder for external volume #85

Open
torwag opened this issue Mar 31, 2016 · 5 comments
Open

Wiki misses the app folder for external volume #85

torwag opened this issue Mar 31, 2016 · 5 comments

Comments

@torwag
Copy link

torwag commented Mar 31, 2016

Hi,

I had the problem, that all additional installed apps disappeared whenever I restarted the container. They were still marked active in the admin settings, but did not appear in the user menu.
A simple deactivate and activate made them available again. The reason might be that the app folder was not persistent. I added an additional volume in the same way like the data and config volumes and that solved the problem.
With this, I was wondering why not keeping the entire owncloud folder persistent. The official container is doing it in that way and can also trigger updates by that (checking for the existence of version.php).
Any reasons for having 3 separate instead of one underlying data volume?

@torwag
Copy link
Author

torwag commented Apr 4, 2016

During my configuration I noticed that the apps folder was once mounted as a seperate volume in the docker file

#expose some important directories as volumes
#VOLUME ["/usr/share/webapps/owncloud/data"]
#VOLUME ["/etc/webapps/owncloud/config"]
#VOLUME ["/usr/share/webapps/owncloud/apps"]

#place your ssl cert files in here. name them server.key and server.crt
#VOLUME ["/root/sslKeys"]

However all this is commented out. I guess to make it more flexible for people and enable direct directory import via the command line. However, the docs describe this for data and config but not for apps. Thus, the missing app folder import might be simply dropped out by accidence?! If so, it would be just the readme resp. the wiki, which requires a change. However, the question remains, why not putting the entire owncloud folder in a directory?

@diegomachadosoares
Copy link

Hi,

I'm having a lot of trouble with the "apps" volume. Lost an entire afternoon trying to make it work...
If I don't mount the apps directory as a volume, everything works fine (SSL, data, config and sslKeys volumes), but, if I mount the apps directory as a volume it simply gives me an error "The page isn't redirecting properly", altough I can access the admin interface, it doesn't really help...

Maybe that is why the docs doesn't mention the possibility of using the apps directory as a volume.
How did you mount it, torwag?

Here is my docker command:

docker run
--volume '/mnt/docker-data/owncloud/config:/usr/share/webapps/owncloud/config'
--volume '/mnt/docker-data/owncloud/data:/usr/share/webapps/owncloud/data'
--volume '/mnt/docker-data/owncloud/ssl:/root/sslKeys'
--link ownpostgres:postgres
--publish 443:443
--name owncloud
--detach
l3iggs/owncloud

And here is the line for adding a apps volume, is this what you did?

--volume '/mnt/docker-data/owncloud/apps:/usr/share/webapps/owncloud/apps' \

regards.

@torwag
Copy link
Author

torwag commented May 30, 2016

@diegomachadosoares
Hi,
I am sorry to hear that it did cost you an afternoon.
I am just a normal user, thus I might be wrong here. But as far as I can see your command should be right. I had the problem that all worked well without apps mounting, but as soon as I stopped the container and restarted it, the apps folder was empty again (non-persistant storage) and one had to reinstall all apps. By mounting the apps folder in an own (persistent) storage, I solved that problem.

Well, my set-up is a bit different. I have a owncloud-data service which I start to provide a container containing all the persistent storage folders for owncloud.
This I start with
/usr/bin/docker create --name owncloud_data -v /home/core/mounts/lvm_owncloud_data/config:/usr/share/webapps/owncloud/config -v /home/core/mounts/lvm_owncloud_data/apps:/usr/share/webapps/owncloud/apps -v /home/core/mounts/lvm_owncloud_data/data:/ocdata l3iggs/owncloud:latest

Then I use this container within the owncloud-container started by

/usr/bin/docker run --hostname=myhost.org --name owncloud --volumes-from owncloud_data -v /home/core/sslKeys:/root/sslKeys --link mariadb:mariadb -p 80:80 -p 443:443 -e VIRTUAL_HOST=myhost.org -e TARGET_SUBDIR=/oc l3iggs/owncloud

--volumes-from owncloud_data provides all the necessary folders. This as far as I understood is the "new" clean way to get data-folders into containers. It is completely seperated, hence I could easily change the way folders are used (e.g. using a different local location, machine or connection type) and my owncloud instance would not need any change. I could even switch between different data containers, e.g. one for testing and one for production (however, this would require to switch to different database containers too).

I'm wondering that this ticket did not catch more interest, as it should address almost all users. How do other keep there apps-folder persistent ?

Hope that helps a bit

Torwag

@greyltc
Copy link
Owner

greyltc commented May 30, 2016

It sounds like you've got things working well @torwag, thanks for explaining your setup! I personally don't keep my apps persistent. I don't even use a volume for data. I use the official "External storage support" app for keeping my data outside of the container.

I actually only use one single volume for config so my setup is pretty simple compared to yours.

When I have some free time, I'll try to experiment with the way you're doing things and incorporate it into the docs.

@nrgeen
Copy link

nrgeen commented May 31, 2016

@greyltc
What connection mode do you use to include your data? WebDAV, SMB, ....?
The solution sounds interesting. But in a first experiment, the sollution was, however, relatively slow. I used SMB / CIFS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants