oc-auth/docker-compose.yml

57 lines
1.7 KiB
YAML
Raw Normal View History

2024-07-26 13:46:05 +02:00
version: '3.4'
services:
2024-10-30 12:38:25 +01:00
traefik:
image: traefik:v2.10.4
container_name: traefik
networks:
- catalog
command:
2024-10-30 17:05:12 +01:00
- "--api.insecure=true"
2024-10-30 12:38:25 +01:00
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--log.level=DEBUG"
ports:
2024-10-30 17:05:12 +01:00
- "8080:80"
- "8082:8080"
2024-10-30 12:38:25 +01:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
whoami: # TEST PURPOSE
image: traefik/whoami
container_name: whoami
networks:
- catalog
ports:
- "5000:80"
labels:
- "traefik.enable=true"
2024-10-30 17:05:12 +01:00
- "traefik.http.routers.whoami.entrypoints=web"
- "traefik.http.routers.whoami.rule=Host(`localhost`)"
2024-11-04 09:43:35 +01:00
- "traefik.routers.whoami.rule=Path(/whoami)"
2024-10-30 17:05:12 +01:00
- "traefik.http.routers.whoami.tls=false"
- "traefik.http.services.whoami.loadbalancer.server.port=80"
- "traefik.http.routers.whoami.middlewares=auth"
oc-auth:
image: 'oc-auth:latest'
2024-07-26 13:46:05 +02:00
ports:
- 8094:8080
container_name: oc-auth
2024-10-30 12:38:25 +01:00
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.auth.forwardauth.address=http://oc-auth:8080/oc/forward"
- "traefik.http.middlewares.auth.forwardauth.authResponseHeaders=X-Forwarded-User"
- "traefik.http.services.auth.loadbalancer.server.port=8080"
environment:
LDAP_ENDPOINTS: ldap:389
LDAP_BINDDN: cn=admin,dc=example,dc=com
LDAP_BINDPW: password
LDAP_BASEDN: "dc=example,dc=com"
LDAP_ROLE_BASEDN: "ou=AppRoles,dc=example,dc=com"
networks:
- catalog
2024-10-30 12:38:25 +01:00
volumes:
- ./pem:/etc/oc/pem
networks:
catalog:
external: true