Files
invariant-gateway/docker-compose.local.yml
T

33 lines
1.1 KiB
YAML

services:
invariant-proxy:
container_name: invariant-proxy
build:
context: ./proxy
dockerfile: ../proxy/Dockerfile.proxy
working_dir: /srv/proxy
env_file:
- .env
environment:
- DEV_MODE=true
- POLICIES_FILE_PATH=${POLICIES_FILE_PATH:+/srv/resources/policies.py}
volumes:
- type: bind
source: ./proxy
target: /srv/proxy
- type: bind
source: ${POLICIES_FILE_PATH:-/dev/null}
target: /srv/resources/policies.py
networks:
- invariant-explorer-web
ports:
- "8005:8000" # Direct access without Traefik
labels:
# For access via Traefik
- "traefik.enable=true"
- "traefik.http.routers.invariant-proxy-api.rule=(Host(`localhost`) && PathPrefix(`/api/v1/proxy/`)) || (Host(`127.0.0.1`) && PathPrefix(`/api/v1/proxy/`))"
- "traefik.http.routers.invariant-proxy-api.entrypoints=invariant-explorer-web"
- "traefik.http.services.invariant-proxy-api.loadbalancer.server.port=8000"
- "traefik.docker.network=invariant-explorer-web"
networks:
invariant-explorer-web:
external: true