- Traefik 2.10 -
https
for local development andLet's Encrypt
in prod - Django, Postgres - with custom User model and registration/authentication endpoints (
Djoser
+SimpleJWT
) - DRF - with swagger (
drf-spectacular
),django-filter
- Celery - with
celery-beat
andflower
- Redis - for cache and broker
- Nuxt 3 - with
SSR
orSPA
in prod - Nginx - for django media and
SPA
- Set the variables in
.env
:COMPOSE_FILE=local.yml DOMAIN=localhost # or your custom domain from etc/hosts
- Run
docker compose build
anddocker compose up -d
- Set the variables in
.env
:COMPOSE_FILE=local.yml:local.traefik.yml DOMAIN=localhost # or your custom domain from etc/hosts
- Run
docker compose build
anddocker compose up -d
Traefik dashboard: http://localhost:8080/dashboard/#/
- Add local domain + subdomain for dashboard in
/etc/hosts
:127.0.0.1 localhost tpl.local tr.tpl.local
- Apply changes:
sudo killall -HUP mDNSResponder
- Install
mkcert
(or another tolls for local certificates) - Go to
./compose/local-ssl/traefik/cert/
- Generate a wildcard certificate for a local domain:
mkcert -cert-file tpl.local.pem -key-file tpl.local-key.pem tpl.local "*.tpl.local" # * for wildcard
- Install local CA certificate with the command:
mkcert -install
- Go to
./compose/local-ssl/traefik/dynamic/
and edittls.yml
. Change the files names to your own - Set the variables in
.env
:COMPOSE_FILE=local.yml:local.traefik.yml:local.traefik.ssl.yml DOMAIN=tpl.local # or your custom domain from etc/hosts
- Run
docker compose build
anddocker compose up -d
Traefik dashboard: https://tr.tpl.local/dashboard/#/
- Set variables in
.env
:COMPOSE_FILE=production.yml:production.ssr.yml
DOMAIN=your_domain.com
- same as your production domain- generate new
login:password
for dashboard:DASHBOARD_LOG_PSW=test:$$apr1$$ozzsQDHl$$wBwHPFJtpA9UQkIE4mXh2/
- Run
docker compose build
anddocker compose up -d
- If the domain is correctly bound to the server, the certificate will be issued automatically with Let's Encrypt
...soon
Traefik dashboard: https://tr.your_domain.com/dashboard/#/