-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add Docker and DockerCompose #22
base: master
Are you sure you want to change the base?
Conversation
2.9 has issues
Thank you for the pull request! This would make running and serving Gutendex much easier. I do not have much experience with Docker, but I will take some time to try your code and learn what each line is doing. |
Hey @garethbjohnson, I would be happy to meet sometime and talk over the changes. I will also work on a readme for the docker folder for install instructions. |
Hi @coleyr, I have tried a few times to run docker-compose up with POPULATE_ON_START=true, but just before I would expect it to start updating the catalog, it seems to stall for a very long time, and my laptop gets loud and hot. Do you have any guesses about why this happens or how to prevent it? Or is this part of normal intended operation, and I just need to be patient while my machine works hard? |
So, without seeing Logs or watching the process, my guess would be the
parsing process is taking extra long, largely due to the fact the
containers have fewer resources available due to being a percent of your
local machine. That said, I have worked on a separate branch to parse the
tar file with fewer read write operations. But the load on start currently
has many reads and writes inside the container which takes a while.
…On Wed, Mar 23, 2022, 3:29 PM Gareth ***@***.***> wrote:
Hi @coleyr <https://github.com/coleyr>, I have tried a few times to run
docker-compose up with POPULATE_ON_START=true, but just before I would
expect it to start updating the catalog, it seems to stall for a very long
time, and my laptop gets loud and hot. Do you have any guesses about why
this happens or how to prevent it? Or is this part of normal intended
operation, and I just need to be patient while my machine works hard?
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFY3XAORFKFP57S7CGUZQ73VBNWIXANCNFSM5PVI5J3A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I added in files to make it possible to use docker and docker-compose so that setup could be one line.
I really appreciate this project and I wanted to use it for a school library application. I thought adding the docker files would make it easier to use for production or development.
The application and postgres can be run using docker-compose from the docker folder using the command:
docker-compose up
The application can be run with nginx, and postgres using:
docker-compose -f ./production_docker_compose up
In the env file in the docker folder I added "POPUlATE_ON_START" variable, if set to true, when the application is run, python manage.py updatecatalog will be called.