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

Added Docker setup. #456

Closed
wants to merge 1 commit into from
Closed

Added Docker setup. #456

wants to merge 1 commit into from

Conversation

jezdez
Copy link

@jezdez jezdez commented Feb 20, 2017

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)

Fix #80

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)
@jezdez
Copy link
Author

jezdez commented Feb 20, 2017

@yohanboniface

  • Could you please take a look at the settings file and if that's the env var names you like? Any settings missing?

Also, there are a few assumptions I've made:

  • you'd have to enable Travis CI for the repo: https://travis-ci.org/

  • sign up for Docker Hub and let me know the username so I can set the DOCKER_IMAGE_NAME env var name in the .travis.yml accordingly, as it consists of the username and project name you chose for uMap

  • in addition you'll have to provide your Docker username and password to the Travis CI project settings as DOCKER_USERNAME and DOCKER_PASSWORD (don't paste them into .travis.yml)

This was referenced Feb 20, 2017
@yohanboniface
Copy link
Member

sign up for Docker Hub and let me know the username so I can set the DOCKER_IMAGE_NAME env var name in the .travis.yml accordingly, as it consists of the username and project name you chose for uMap

My username is "yohanboniface". I've also added "umap" as organisation, and you as this organisation maintainer.

in addition you'll have to provide your Docker username and password to the Travis CI project settings as DOCKER_USERNAME and DOCKER_PASSWORD (don't paste them into .travis.yml)

No way to add in encrypted in the travis.yml?

import environ
from umap.settings.base import * # pylint: disable=W0614,W0401

env = environ.Env()
Copy link
Member

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]
Copy link
Member

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:
Copy link
Member

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.

@ixeft
Copy link

ixeft commented May 6, 2018

Hello,
What is the status of this PR ?
I would be interested in this functionality, and it seems quit advanced :)

@jezdez
Copy link
Author

jezdez commented Mar 23, 2019

Ugh, I forgot I did this, not sure. @yohanboniface Do you still want/need this?

@yohanboniface
Copy link
Member

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.

@xthursdayx
Copy link

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.

@drunkod
Copy link

drunkod commented May 19, 2019

I support it.
  It speeds up development!

@fti7
Copy link

fti7 commented Jul 27, 2019

Please merge! :-)

@lyz-code
Copy link

lyz-code commented Jan 2, 2020

@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.

@jezdez
Copy link
Author

jezdez commented Jan 2, 2020

No idea, I’m sorry, I haven’t had time to look into it and don’t have a need for it anymore.

@Duvel
Copy link
Contributor

Duvel commented Jan 5, 2020

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.

@Duvel
Copy link
Contributor

Duvel commented Jan 5, 2020

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.

@Fi1osof
Copy link

Fi1osof commented Apr 30, 2020

Did try this. Many errors. Sad :(
@jezdez, thanks for trying!

@Duvel
Copy link
Contributor

Duvel commented May 15, 2020

@Fi1osof I updated my fork with the files, that I used to get a working docker image. It is based on the work done by @jezdez and I updated it for the newer versions of uMap. I added a pull request #801 if we would like to have this as part of this project.

@jezdez
Copy link
Author

jezdez commented Aug 3, 2021

Closing in favor of #801.

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.

Dockerfile
9 participants