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
|
2025-02-19 12:02:44 +01:00
|
|
|
restart: unless-stopped
|
2024-10-30 12:38:25 +01:00
|
|
|
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"
|
2025-02-19 12:02:44 +01:00
|
|
|
- "--entrypoints.web.address=:8000"
|
2024-10-30 12:38:25 +01:00
|
|
|
ports:
|
2025-02-19 12:02:44 +01:00
|
|
|
- "8000:8000" # Expose Traefik on port 8000
|
2024-10-30 12:38:25 +01:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2024-10-28 14:58:11 +01:00
|
|
|
oc-auth:
|
|
|
|
image: 'oc-auth:latest'
|
2024-07-26 13:46:05 +02:00
|
|
|
ports:
|
2024-10-28 14:58:11 +01:00
|
|
|
- 8094:8080
|
|
|
|
container_name: oc-auth
|
2024-10-30 12:38:25 +01:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
2025-02-19 12:02:44 +01:00
|
|
|
- "traefik.http.routers.auth.entrypoints=web"
|
|
|
|
- "traefik.http.routers.auth.rule=PathPrefix(`/auth`)"
|
|
|
|
- "traefik.http.middlewares.auth-rewrite.replacepathregex.regex=^/auth(.*)"
|
|
|
|
- "traefik.http.middlewares.auth-rewrite.replacepathregex.replacement=/oc$$1"
|
|
|
|
- "traefik.http.routers.auth.middlewares=auth-rewrite"
|
|
|
|
- "traefik.http.services.auth.loadbalancer.server.port=8080"
|
2024-10-30 12:38:25 +01:00
|
|
|
- "traefik.http.middlewares.auth.forwardauth.address=http://oc-auth:8080/oc/forward"
|
2024-10-28 14:58:11 +01:00
|
|
|
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
|
2024-10-28 14:58:11 +01:00
|
|
|
networks:
|
|
|
|
catalog:
|
|
|
|
external: true
|