-
Notifications
You must be signed in to change notification settings - Fork 392
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
Where / how to store persistent files from the docker image #454
Comments
@4shaw this is something i would like to understand as well!
in the meanwhile, if you just saving images an interesting workaround might be to use http://cloudinary.com which would host them in a CDN and give you transformations via url. i found this meteor package that might be useful: https://github.com/Lepozepo/cloudinary |
I've just been using S3 personally. It's very inexpensive, and cloud storage seems to jive well with the docker philosophy. On Sat, May 30, 2015 at 4:40 PM, henrique matias notifications@github.com
Matt Moyles |
@dubvfan87 indeed, but sometimes you sont want to trust your files to other hosts ( : |
Thanks for the suggestions. I have tested by downloading the mupx repo and adding the volume for storage and it works. I called it "static" The new directory structure at /opt/-appname-/ looks like: config/ The static/ directory has been added and is not affected during deployment process... from within meteor you can access the static directory as though it were a root directory: Then with nginx you can create an alias to point to to your static directory at: It would be cool if the meteor up team could consider adding this to the mupx branch so that we could start using it. |
Are there any other solutions to allow us to write to the filesystem? We have meteor apps running on a server in our intranet, one of which after updating required mupx to get redeployed. It builds PDFs and writes them to a shared folder in the filesystem. Or it used to anyhow, now it throws an "Error: ENOENT, open '/..../...pdf'" exception. Editing the mupx repo, installing/configuring nginx etc is all a bit much for us just to be able to write files to the filesystem, so hoping there's a simpler workaround. |
I'm thinking you could mount a volume with a change to the docker run command. Here is an interesting thread as well. It's this start.sh file that is where docker container is run with other volume mount entries. You could also I imagine use docker exec to execute the nessecary commands after mupx is done from ssh possibly. The new port underway at kadirahq may have an option for that? Or a request there might be warranted. |
Hi... sorry for the delayed reply I can't remember everything I did to get it to work but I have the files on eg: You can clone the repo with the below url: I just install mup4 from the directory like this: npm install -g its outdated now im sure but it still work well for me On Sun, Jul 31, 2016 at 9:18 PM, Zachary Botterman <notifications@github.com
|
@4shaw No problem! I deleted my comment because I found a sustainable solution for me. Found mupx directory in
I had to rerun The static directory is now accessible and persistent! |
zb0t, can you explain a little more about what you did? How does your volume command end up pointing to your static directory? Where/how is APP_PATH set, in your settings.json file? I assume you could make your static directory manually, but found it easier to automate it? THanks, Matt |
@greenwolfe I have a typo! It is accessible at I had issues not adding a base director, i.e. Notice in
You could make the directory manually but in case I change my deployment location, this will be setup correctly every time. Hope this helps. |
Thanks for the help! I got it working with the help also of issue235 from the meteor-uploads package. |
mup now supports 'volumes' option in mup.js |
Still using meteor@1.1 and plan to stay that way for this year until things settle down some more. There are only so many times I can afford to completely rewrite my code. When I tried the lastest mup, it did not work with my version of meteor, so mupx with the hack for volumes is my best option until next summer. |
Hi... Im trying to save persistent files that can be served via nginx.
I cant save to the public directory as this is always overwritten on deploy.
Im trying to write to the file system with:
fs.writeFile('static/', ...)
this lands up on the host in: /opt/appname/current/bundle/programs/server/static
This gets overwritten on every deploy
then i tried:
fs.writeFile('/static/path', ...) Note the preceeding '/'
Im not sure where these files are... probably in the docker container?
Is there no volume on the container to store images etc that will persist through the deployment process
How would you go about doing this?
Thanks
Possible solution could be to add a volume for these files on the meteorhacks/meteord:base image?
Currently:
"Volumes": {
"/bundle": "/opt/appname/current"
},
To:
"Volumes": {
"/bundle": "/opt/appname/current",
"/static": "/opt/appname/static"
},
The text was updated successfully, but these errors were encountered: