Salutation

155 views
Skip to first unread message

codesheets codeshet

unread,
Sep 2, 2024, 6:39:02 PMSep 2
to django...@googlegroups.com
Bojour

Abdo junior

unread,
Sep 3, 2024, 9:27:29 AMSep 3
to django...@googlegroups.com
Bojour

On Tue, 3 Sept 2024 at 00:38, codesheets codeshet
<codesh...@gmail.com> wrote:
>
> Bojour
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEqYZcO5TGFmQL4hmoeRrVtOdP7%2BH82ZKc2Jps7NyVdPAYJX3A%40mail.gmail.com.

Madoché K

unread,
Sep 3, 2024, 9:27:31 AMSep 3
to django...@googlegroups.com

Bonjour

Mupenda Kimpulenge Gaston

unread,
Sep 3, 2024, 9:27:37 AMSep 3
to django...@googlegroups.com
bonjour

oladipo...@gmail.com

unread,
Sep 27, 2024, 2:59:23 PMSep 27
to django...@googlegroups.com
hi

oladipo...@gmail.com

unread,
Sep 27, 2024, 3:03:03 PMSep 27
to django...@googlegroups.com
hi

Sreedhar p

unread,
Sep 27, 2024, 3:42:35 PMSep 27
to django...@googlegroups.com

Hii


On Sat, Sep 28, 2024, 00:32 <oladipo...@gmail.com> wrote:
hi

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Amir Jamshidi

unread,
Sep 28, 2024, 12:15:45 AMSep 28
to django...@googlegroups.com
Salam



--
___________________________________
Amir JamshidiJam
Computer Engineering at Shiraz University
4|\/|!|2_|_|

Shivansh Varshney

unread,
Sep 28, 2024, 11:29:50 AMSep 28
to Django users
Hii

Van Kamanga

unread,
Sep 28, 2024, 11:50:27 AMSep 28
to django...@googlegroups.com

Abdul Qoyyuum Haji Abdul Kadir

unread,
Sep 28, 2024, 11:52:03 AMSep 28
to django...@googlegroups.com
Can we not start a hello thread and spam everyone, please? Thank you.



--
Abdul Qoyyuum Bin Haji Abdul Kadir
Nickname: Q

Sreedhar p

unread,
Sep 30, 2024, 9:02:00 AMSep 30
to django...@googlegroups.com

Can any one explain how to connect django site with sql in docker containers
I created two containers one for application and one for sql database in same network the database is exposed in port no 3307 application requests does not process by database then how to solve this?


Hernan Gustavo

unread,
Sep 30, 2024, 11:43:34 AMSep 30
to django...@googlegroups.com
Hi Sreedhar.

Can you show us your docker files? Dockerfiles and .yml

Abdul Qoyyuum Haji Abdul Kadir

unread,
Sep 30, 2024, 8:11:30 PMSep 30
to django...@googlegroups.com
If the django site is one docker image and the postgresql is another docker image, you would connect them together via docker-compose.yml (simply speaking).

Taking an example from Docker docs, you need a Dockerfile (example file link here) with the requirements.txt file available to Dockerfile to build a docker image.

The compose.yaml or docker-compose.yml contains the docker build for the Django app, but at the same time, builds the sql (in this case, a postgresql) database and connects them both here:
services:
  db:
    image: postgres
    volumes:
      - ./data/db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    environment:
      - POSTGRES_NAME=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    depends_on:
      - db

The structure would look like this:
.
├── compose.yaml
├── app
    ├── Dockerfile
    ├── requirements.txt
    └── manage.py

Then run `docker compose -f compose.yaml` or whatever the file name be if its not docker-compose.yaml or docker-compose.yml



Reply all
Reply to author
Forward
0 new messages