reworded docker compose files to segregate responsibilites. Dev version no longer uses the nginx proxy to proxy, merely to be the static file server. Also dev version no longer used gunicorn as it was screwing up the live reload functionality and didn't provide any other benefit.

This commit is contained in:
Wouter Vermeer
2026-04-30 17:41:21 +02:00
parent a0a0cfab8a
commit 358bd4cbf2
4 changed files with 52 additions and 31 deletions

View File

@@ -1,18 +1,36 @@
---
services:
web:
command: gunicorn --capture-output --enable-stdio-inheritance -b 0.0.0.0:8000 website.wsgi:application
volumes:
- ./src:/src
command: python manage.py runserver 0.0.0.0:8000
volumes: [./src:/src]
env_file:
- path: .env.template
required: true
- path: .env
required: false
environment:
DJANGO_RELOAD: true
DEBUG: true
ALLOWED_HOSTS: localhost,127.0.0.1
ports: [127.0.0.1:8000:8000]
db:
env_file:
- path: .env.template
required: true
- path: .env
required: false
proxy:
restart: unless-stopped
ports: [127.0.0.1:80:80]
environment: [NGINX_HOSTNAME=localhost, NGINX_PORT=80]
tailwind:
image: python:3.14-slim
working_dir: /src
command: >
sh -c "apt-get update && apt-get install -y curl &&
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
-o /usr/local/bin/tailwindcss &&
chmod +x /usr/local/bin/tailwindcss &&
tailwindcss -i ./static/css/input.css -o ./static/css/output.css --watch"
volumes: [.:/src]
networks: [frontend]