Skip to content

Instantly share code, notes, and snippets.

@piavgh

piavgh/docker-compose.yml

Last active Aug 13, 2020
Embed
What would you like to do?
Traefik docker-compose.yml for OpenPaaS SPAs
version: '3'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.2
# Enables the web UI and tells Traefik to listen to docker
command:
- "--log.level=INFO"
- "--accesslog=true"
- "--providers.docker"
- "--api.insecure=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
# The HTTP port
- "4000:80"
# The HTTPS port
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "8081:8080"
volumes:
# So that Traefik can listen to the Docker events
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- esn-network
esn-frontend-login:
image: openpaas-suite/esn-frontend-login
container_name: esn-frontend-login
environment:
- OPENPAAS_API_URL=http://localhost:8080
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.stripprefix-login.stripprefix.prefixes=/login"
- "traefik.http.routers.esn-frontend-login.rule=PathPrefix(`/login`)"
- "traefik.http.routers.esn-frontend-login.entrypoints=web"
- "traefik.http.routers.esn-frontend-login.middlewares=stripprefix-login@docker"
networks:
- esn-network
esn-frontend-contacts:
image: openpaas-suite/esn-frontend-contacts
container_name: esn-frontend-contacts
environment:
- OPENPAAS_API_URL=http://localhost:8080
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.stripprefix-contacts.stripprefix.prefixes=/contacts"
- "traefik.http.routers.esn-frontend-contacts.rule=PathPrefix(`/contacts`)"
- "traefik.http.routers.esn-frontend-contacts.entrypoints=web"
- "traefik.http.routers.esn-frontend-contacts.middlewares=stripprefix-contacts@docker"
networks:
- esn-network
esn-frontend-calendar-public:
image: openpaas-suite/esn-frontend-calendar-public
container_name: esn-frontend-calendar-public
environment:
- OPENPAAS_API_URL=http://localhost:8080
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.stripprefix-excal.stripprefix.prefixes=/excal"
- "traefik.http.routers.esn-frontend-calendar-public.rule=PathPrefix(`/excal`)"
- "traefik.http.routers.esn-frontend-calendar-public.entrypoints=web"
- "traefik.http.routers.esn-frontend-calendar-public.middlewares=stripprefix-excal@docker"
networks:
- esn-network
networks:
esn-network:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment