jedie / django-for-runners

Store your GPX tracks of your running (or other sports activity) in django.
GNU General Public License v3.0
59 stars 14 forks source link

start Dockerfile #5

Closed Strubbl closed 4 years ago

Strubbl commented 5 years ago

This commit starts a Dockerfile. With the following commands i build the container, run the web server and create a user for the app:

$ docker build --pull -t docker_djangorunners .
$ docker run -it -p 8055:8000 docker_djangorunners
$ docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                                            NAMES
613fbb0c9218        docker_djangorunners   "/bin/sh -c 'cd ${RU…"   9 seconds ago       Up 7 seconds        0.0.0.0:8055->8000/tcp                           friendly_lehmann
$ docker exec -it 613fbb0c9218 ./Django-ForRunners/bin/manage createsuperuser
Django-ForRunners v0.10.0
Use settings: /home/runner/Django-ForRunners/src/django-for-runners/for_runners_project/settings.py
Use Database: '/home/runner/Django-ForRunners/Django-ForRunners-database.sqlite3'
Tracks stored in '/home/runner/Django-ForRunners/media'
Username (leave blank to use 'runner'):
…
jedie commented 4 years ago

As https://github.com/jedie/django-for-runners/pull/6#issuecomment-562697610 why should docker needed here?

Strubbl commented 4 years ago

This way i do not need to install python and all required packages onto my machine.

jedie commented 4 years ago

This way i do not need to install python and all required packages onto my machine.

OK, you are a windows user?

Strubbl commented 4 years ago

I use several OS

jedie commented 4 years ago

With https://github.com/jedie/django-for-runners/pull/13 i add a docker based deployment. It's not really for developing, but for production used. So i will close this pull request, now.