Skip to content

Commit

Permalink
Merge pull request #786 from vincenttisseront/main
Browse files Browse the repository at this point in the history
Create docker-compose-traefik.yml
  • Loading branch information
ab-smith authored Sep 19, 2024
2 parents 3d62228 + 83ea069 commit 7fed1a8
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions docker-compose-traefik.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: "3.9"

services:
backend:
container_name: backend
image: ghcr.io/intuitem/ciso-assistant-community/backend:latest
restart: always
labels:
- traefik.enable=true
- "traefik.http.routers.backend.rule=(Host(`localhost`) && Pathprefix(`/api/`))"
- traefik.http.services.backend.loadbalancer.server.port=8000
- "traefik.http.middlewares.backendpathstrip.stripprefix.prefixes=/api"
- traefik.http.routers.backend.entrypoints=websecure
- traefik.http.routers.backend.tls=true
environment:
- CISO_ASSISTANT_URL=http://localhost
- ALLOWED_HOSTS=backend,localhost
- DJANGO_DEBUG=True
- AUTH_TOKEN_TTL=7200
volumes:
- ./db:/code/db
networks:
- front

frontend:
container_name: frontend
restart: unless-stopped
labels:
- traefik.enable=true
- "traefik.http.routers.ciso.rule=(Host(`localhost`) && Pathprefix(`/`))"
- "traefik.http.middlewares.cisopathstrip.stripprefix.prefixes=/"
- traefik.http.services.ciso.loadbalancer.server.port=3000
- traefik.http.routers.ciso.entrypoints=websecure
- traefik.http.routers.ciso.tls=true
environment:
- PUBLIC_BACKEND_API_URL=http://backend:8000/api
- PUBLIC_BACKEND_API_EXPOSED_URL=https://localhost:443/api
- PROTOCOL_HEADER=x-forwarded-proto
- HOST_HEADER=x-forwarded-host
image: ghcr.io/intuitem/ciso-assistant-community/frontend:latest
depends_on:
- backend
networks:
- front

networks:
front:
external: true

0 comments on commit 7fed1a8

Please sign in to comment.