Go to file
2021-04-27 08:44:13 +02:00
Dockerfiles First commit 2021-04-01 09:48:35 +02:00
asgi.py First commit 2021-04-01 09:48:35 +02:00
Caddyfile.dev Update caddy files 2021-04-16 18:35:06 +02:00
Caddyfile.pro Update caddy files 2021-04-16 18:35:06 +02:00
Caddyfile.staging Update caddy files 2021-04-16 18:35:06 +02:00
django-launcher.dev.sh Update django-launcher.dev.sh 2021-04-27 08:43:47 +02:00
django-launcher.pro.sh Update django-launcher.pro.sh 2021-04-27 08:44:13 +02:00
docker-compose.dev.yaml Update docker-compose.dev.yaml 2021-04-21 16:55:33 +02:00
docker-compose.pro.yaml Update docker-compose.pro.yaml 2021-04-21 16:56:46 +02:00
docker-compose.staging.yaml Update docker-compose.staging.yaml 2021-04-21 16:58:03 +02:00
gulpfile.js First commit 2021-04-01 09:48:35 +02:00
Makefile Update README and Add Makefile 2021-04-01 09:58:13 +02:00
package.json First commit 2021-04-01 09:48:35 +02:00
README.md Update README and Add Makefile 2021-04-01 09:58:13 +02:00
requirements.txt Update requirements.txt 2021-04-07 09:11:24 +02:00

Install

Django

https://programadorwebvalencia.com/django-chat-usando-websockets-con-salas-y-async/

Gulp

npm i

Run.

gulp dev

Config

Change path templates

In settings.py.

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

Update DIRS.

'DIRS': [str(BASE_DIR) + '/app/templates/'],

Run development

make run.server

Now open:

http://api.localhost

Other domains

  • Caddy: http://api.localhost.
  • Gulp: http://localhost:3000.
  • Django: http://localhost:8000.
  • Mailhog: http://localhost:8025.
  • Postgres: localhost:5432.

Bash Django

docker exec -it api_django_1 bash

Run production

docker-compose -f docker-compose.pro.yaml up

Open https://domain.com.