-
Notifications
You must be signed in to change notification settings - Fork 46
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
Dockerize #69
Comments
@laidig gladly, Please do! Thanks in advance! And if possible also put a from-scratch sequence of commands for someone to install docker and deploy the dockerized app. And also how I can update it when there are changes (or I'll leave it to you for doing at major version changes). Please let me know what you need from my end. I can download and re-upload the file into the Releases section. |
There are two components to Dockerizing:
I'd take on 1, and then we can decide on 2. Of course, docs would go with both ;) |
@laidig I'll let you take lead on this as I'm currently uninitiated regarding docker. You mentioned docs.. do share clearly on what's needed. |
I made a first pass at this: To run from Docker: Your feedback, if you have any, is appreciated. It can likely be refined, but I haven't played around with it enough to be sure that it is working well yet. |
I made a second pass (same instructions), and the docker image is now half the size of the previous one. I might be able to get it smaller still. |
@laidig that's great.. thank you so much for giving your time for this. Sorry i'm not able to give this a spin for now, am working on bringing in another city's data format. Question: if the program uses HDF5 file formats (.h5 files) to store and retrieve tables, then can a dockerized version of it run smoothly on windows? I'm exploring using HDF5, it's working fine in ubuntu but on windows I'm running into many issues with my old (and not updated) win7 boot. Another query: If we make a dockerized version from an ubuntu OS, can it work in windows OS? And then another query, dumbing it down even further: Can the docker version for windows run from double-clicking a .exe or shortcut? If not immediately, then is it possible to engineer such a solution? |
This Docker image is running "Slim" Debian (not full Ubuntu) under another Host OS-- I'm using Mac OS. It works easily under Win10 or Windows Server because they have Hyper-V built in. It also works not as smoothly under Windows 7/8 via Docker Toolbox (https://docs.docker.com/toolbox/toolbox_install_windows/#step-2-install-docker-toolbox) So yes, the file format should work when running on a Windows host because the code sees a Linux OS. But that brings up another thing I have to resolve-- the current configuration I made doesn't necessarily save data across reboots-- I'll add a persistent volume to take care of that. |
Follow up question to my last point: I'm assuming the persistent data is kept in the GTFS directory, correct? |
@laidig thanks, good to know it can work across OS's. Yes, the program's persistent data stored in See Technical Overview wiki page for other details on how the program works. |
Hi @laidig , just a heads up, I'm working on a major overhaul that started with the way the DB is handled but has ended up including several improvements all over the place. I should be able to put something up by end of June 2018. There will be changes in the DB structure: now instead of two .json files there will be a variable number of .h5 files, one for each .txt file and thus different operators may having differing files. |
My guess is that it should not be a problem.
Do you have a commit I could test against?
Also, we can set up automatic builds from Github, so that with every commit
to master, the Docker image is rebuilt.
…On Mon, Jun 18, 2018 at 1:57 AM Nikhil VJ ***@***.***> wrote:
Hi @laidig <https://github.com/laidig> , just a heads up, I'm working on
a major overhaul that started with the way the DB is handled but has ended
up including several improvements all over the place. I should be able to
put something up by end of June 2018. There will be changes in the DB
structure: now instead of two .json files there will be a variable number
of .h5 files, one for each .txt file and thus different operators may
having differing files.
Please explore if the docker thing will be able to support HDF5 format. It
is not a pure-Python thing like TinyDB which was handling working with the
.json files.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAwdPZNg00PepTs-52x07DtWjUt52rRrks5t90ExgaJpZM4TqlKQ>
.
|
I should have a commit up by next week. |
I saw your latest version and made an update of the docker image. Do you have any set of tests (even at the level of: do this, expect this) for functionality to make sure that it's working? |
Hi @laidig , thanks for this! I was making changes myself for the next release. From the pull request #102 I understand there's only a line to delete from Asking because in the PR there's other files also getting involved so I'd rather make changes and push from my end. |
In the files and folders structure, I've renamed the GTFS folder to 'db; now. But all the other folders on the repo are also needed for the program. You had included GTFS under "volumes" heading in |
Yes. Gtfs to db is an important change to make.
I can test the persistence later.
…On Mon, Sep 10, 2018 at 11:11 PM Nikhil VJ ***@***.***> wrote:
In the files and folders structure, I've renamed the GTFS folder to 'db;
now. But all the other folders on the repo are also needed for the program.
You had included GTFS under "volumes" heading in docker-compose.yml.
Should the other folders be included there too?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAwdPYNQIIWKwTJl8teMi4USjoaBB5EXks5uZ1P6gaJpZM4TqlKQ>
.
|
@laidig do I have to edit docker-compose.yml to specify which folders will have to be persistent? |
Yes.
The term for persistence is called a Volume.
…On Thu, Nov 8, 2018 at 4:44 AM Nikhil VJ ***@***.***> wrote:
@laidig <https://github.com/laidig> do I have to edit docker-compose.yml
to specify which folders will have to be persistent?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAwdPRbJfq2Ak7Uck_brRNABSg_Xqqfhks5utCcZgaJpZM4TqlKQ>
.
|
Thanks @laidig for the clarification. I want to be able to build and deploy this project in docker from source, instead of pulling an image from docker website/repo. I followed some leads given in this guide and from what is already shared here. Sharing a full report here. I'm able to make this run, but not able to have persistent storage yet. Build
It installs and creates the docker images. Run
That works, the program launches (but doesn't launch a browser tab, thats ok), I can now operate it on http://localhost:5000 . But the storage isn't persistent! I make data changes (create a new frequency), exit the program by Ctrl+C in terminal, then if I run it again, all the data has been reset to original. Contents of the docker files:docker-compose.yml :
Additional query: I want to include my .dockerignore :
Dockerfile :
Abridged terminal log of build processthere is something regarding tzdata that might be relevant:
So, the main question : I have specified |
Update: I wasn't able to figure out anything solid from the docs or the similar questions posted on stackoverflow, but through trial and error I have managed to achieve persistence of data by modifying the run command, adding a -v key. For completeness, including the build command preceding it too:
the 'persistent' word up there can be anything, it's a label. And if you use another label, that will start a different persistent data store, so with that there's an opportunity: Opportunity for multiple feeds management through docker
Example:
Ignore the in-program URL shared; through docker you can now have two different instances of static-GTFS-Manager running with separate databases on http://localhost:5000 and http://localhost:5001 . You can list the volumes created with this command: Of course, if running this directly from python or windows exe you can simply clone the folder and do different business in different folders ;) More Questions ariseOk, after play time, this still raises some questions that I don't have an answer to right now:
|
Update : I got rid of
... and it worked! So it seems |
Edit: Update for continuity for readers: Docker business sorted out! See Running with Docker on any OS . Fresh work was done at #129 , #130 @laidig pulling your comment under Packaging for Linux to here to continue the conversation here.
|
Looks like interesting work you have done. Would you accept a version that runs in Docker?
I could contribute it in the next couple weeks.
The text was updated successfully, but these errors were encountered: