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
Added Docker setup. #456
Added Docker setup. #456
Conversation
This adds: - a Dockerfile - a Docker compose file for easy testing - a Travis CI setup - so that it can build a Docker image and push to Docker Hub automatically - it does that on every Git tag as well and push a equally tagged version to Docker Hub - extends the Makefile to add some helper tasks for docker (e.g. make docker-test)
Also, there are a few assumptions I've made:
|
My username is "yohanboniface". I've also added "umap" as organisation, and you as this organisation maintainer.
No way to add in encrypted in the travis.yml? |
import environ | ||
from umap.settings.base import * # pylint: disable=W0614,W0401 | ||
|
||
env = environ.Env() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to keep in docker.py
only the specific bits, so I'd move the env sniffing in base.py
. Appart from the new depss, it does not hurt, and may even save someone's day :)
- docker | ||
|
||
install: | ||
- pip install -e .[dev] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we create the psql db to be able to run tests?
) | ||
SOCIAL_AUTH_OPENSTREETMAP_KEY = env('OPENSTREETMAP_KEY', default='') | ||
SOCIAL_AUTH_OPENSTREETMAP_SECRET = env('OPENSTREETMAP_SECRET', default='') | ||
if SOCIAL_AUTH_OPENSTREETMAP_KEY and SOCIAL_AUTH_OPENSTREETMAP_SECRET: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope for this PR, but someone may want to run uMap with another OAuth provider. Not sure how to make this easy/possible with Docker.
Hello, |
Ugh, I forgot I did this, not sure. @yohanboniface Do you still want/need this? |
A uMap Docker image would of course be awesome! But I'm missing Docker habits myself and time to join the effort. Mainly, I've bad (old) experience with data management when updating a docker image. I'll try to have a deeper look anyway. |
I'm super interested in this as well. I had tried to figure out how to create a docker container of uMap myself, but the limits of my technical capacity quickly became apparent. |
I support it. |
Please merge! :-) |
@yohanboniface @jezdez Any advance on this PR? If you specify what does it lack to be able to be merged into master I may be able to help. |
No idea, I’m sorry, I haven’t had time to look into it and don’t have a need for it anymore. |
Maybe it could be an idea to split the travis part from the docker part and add that later? @yohanboniface did add some comments, but I think that these also can be resolved later. One of the things currently missing in the docker container is correct logging. I have version 0.8.2 running in docker, but version 1.1.2 is giving errors and I have no clue why, because of missing logging. |
I got logging working in my test now, thanks to docker.py in msgre/uwsgi_logging@4055e52. So probably that is something we would want to add. |
Did try this. Many errors. Sad :( |
Closing in favor of #801. |
This adds:
Fix #80