GithubHelp home page GithubHelp logo

Comments (7)

mjhea0 avatar mjhea0 commented on July 3, 2024

I agree with you on almost all of this. I am planning on refreshing the tutorial very soon. Do you want to submit a PR for the changes to the compose file?

from django-on-docker.

daddydrac avatar daddydrac commented on July 3, 2024

There also seems to be an issue with Postgres, there isnt a local db file that gets created in the folder postgres_data that is supposed to be mounted.

from django-on-docker.

sms-swe avatar sms-swe commented on July 3, 2024

Comment out the bold line. This clears out the database every time the container is built. Only took me two weeks and countless google searches to figure out.

#!/bin/sh

if [ "$DATABASE" = "postgres" ]
then
echo "Waiting for postgres..."

while ! nc -z $SQL_HOST $SQL_PORT; do
  sleep 0.1
done

echo "PostgreSQL started"

fi

python manage.py flush --no-input
python manage.py migrate

exec "$@"

from django-on-docker.

daddydrac avatar daddydrac commented on July 3, 2024

I have new compose version I made on my own and works great; Entrypoint was a thing we did back in the day when Docker was in its infancy. If you use Docker CE + Compose Entrypoint is not meeded, unless you are doing complex tasks like Docker swarm.

from django-on-docker.

mjhea0 avatar mjhea0 commented on July 3, 2024

@joehoeller can I take a look at your compose file? Thanks!

from django-on-docker.

mjhea0 avatar mjhea0 commented on July 3, 2024

Fixed #8

from django-on-docker.

mjhea0 avatar mjhea0 commented on July 3, 2024

Thanks for you help on this @glebmikha. I made some additional changes and refreshed the post. https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/

from django-on-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.