Running with Docker Compose

Running database migrations with Docker Compose

Want more?

This lesson for enrolled students only. Join the course to unlock it!

You can see the code changes implemented in this lecture below.

If you have purchased the course in a different platform, you still have access to the code changes per lecture here on Teclado. The lecture video and lecture notes remain locked.
Join course for $15

New files

start-django.sh
#!/bin/bash
poetry run python manage.py migrate

poetry run python manage.py runserver 0.0.0.0:8000

Modified files

Dockerfile
--- 
+++ 
@@ -15,7 +15,8 @@
 RUN poetry install

 COPY . .
+RUN chmod 755 /code/start-django.sh

 EXPOSE 8000

-ENTRYPOINT ["poetry", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"]+ENTRYPOINT [ "/code/start-django.sh" ]