Docker Compose - Deploy Django with Nginx and MySql services

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

Комментарии • 20

  • @lalalala99661
    @lalalala99661 Год назад

    Thank you for that video that was what i was looking for. Keep it like you do it thank you

  • @Sanny-z7n
    @Sanny-z7n Год назад

    ThankYou so much for this video. very helpful..

  • @maxjokar7920
    @maxjokar7920 Год назад +1

    Hello sir, thanks for your time and efffort , question here is why we have 2 dockerfile? what is the reason . thanks and waiting for your respond.👍

    • @growyourskill1
      @growyourskill1  Год назад +2

      I used separate Dockerfile for nginx and django so that we can have custom instructions and can build as per the instructions. For mysql used the default base image, however we can have a Dockerfile for mysql as well. Its just a matter of preference and depends on use case. Thank you.

  • @clown_bunny6325
    @clown_bunny6325 11 месяцев назад

    thank you sir its the most clear video on explanation, but one i have MySQL community server , and using some third party software's for backup, so can we connect Django docker to the MySQL of localhost

    • @growyourskill1
      @growyourskill1  11 месяцев назад

      So glad to hear that it helped. If I understood correctly, u r trying to connect django running in docker to mysql running on host machine?
      If this is the case, very easily we can connect django running in docker to mysql running on localhost. All you need to do is to change the mysql connection string in django to point to localhost instead of docker service name. hope this helps

  • @tarikzaki5442
    @tarikzaki5442 Год назад

    you may need to install these dependencies globally to be able to install mysqlclinet in your virtual environment:
    sudo apt-get install python3-dev default-libmysqlclient-dev build-essential

    • @growyourskill1
      @growyourskill1  Год назад

      Yes connecting MySQL with python requires Mysqclient which in turn requires dev tools and other packages. Thanks

  • @7999rahul
    @7999rahul Год назад

    very helpful, for static files are you giving directives in the nginx conf?

    • @growyourskill1
      @growyourskill1  Год назад +1

      Yes for rendering static files, need to provide alias in nginx.

  • @chill-hot-stream
    @chill-hot-stream 8 месяцев назад

    great work well explained.But i have a question.If i want to pass env variables to a nuxt application how should i do it

    • @growyourskill1
      @growyourskill1  8 месяцев назад

      You can export env variables to container, either in docker compose file or dockerfile

  • @media7588
    @media7588 Год назад

    So thanks you

  • @OnTheSpurOfTheMoment
    @OnTheSpurOfTheMoment 9 месяцев назад

    Why can't we add the migrate command to the docker compose??

  • @SpandanKar-fu1nn
    @SpandanKar-fu1nn Год назад

    unable to install mysqlclient, whats the solution?

    • @growyourskill1
      @growyourskill1  Год назад

      mysqlclient requires python dev tool as well as MySQL dev tools. Pl refer to documentation pypi.org/project/mysqlclient/