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

Add Docker and DockerCompose #22

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

coleyr
Copy link

@coleyr coleyr commented Mar 1, 2022

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.

@garethbjohnson
Copy link
Owner

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.

@coleyr
Copy link
Author

coleyr commented Mar 8, 2022

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.

@garethbjohnson
Copy link
Owner

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?

@coleyr
Copy link
Author

coleyr commented Mar 23, 2022 via email

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

Successfully merging this pull request may close these issues.

None yet

3 participants