Last active
April 5, 2024 10:03
-
-
Save arsalanses/2684df1f7bed5660cf1f84136738c1a9 to your computer and use it in GitHub Desktop.
Web Interface for the Docker Registry + forward auth service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| traefik: | |
| image: traefik:v2.11.0 | |
| command: --providers.docker | |
| ports: | |
| - "80:80" | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock:ro | |
| networks: | |
| - web | |
| nforwardauth: | |
| image: nosduco/nforwardauth:v1.4.0 | |
| networks: | |
| - web | |
| environment: | |
| - TOKEN_SECRET=d2076b0b0c15efb3281994 | |
| - AUTH_HOST=nforwardauth.arsalanse.ir | |
| labels: | |
| - "traefik.enable=true" | |
| - "traefik.http.routers.nforwardauth.rule=Host(`nforwardauth.arsalanse.ir`)" | |
| - "traefik.http.routers.nforwardauth.entrypoints=http" | |
| - "traefik.http.middlewares.nforwardauth.forwardauth.address=http://nforwardauth:3000" | |
| - "traefik.http.services.nforwardauth.loadbalancer.server.port=3000" | |
| volumes: | |
| - "./passwd:/passwd:ro" | |
| whoami: | |
| image: traefik/whoami:v1.10.1 | |
| networks: | |
| - web | |
| labels: | |
| - "traefik.enable=true" | |
| - "traefik.http.routers.whoami.rule=Host(`whoami.arsalanse.ir`)" | |
| - "traefik.http.routers.whoami.entrypoints=http" | |
| - "traefik.http.services.whoami.loadbalancer.server.port=80" | |
| - "traefik.http.routers.whoami.middlewares=nforwardauth" | |
| registry: | |
| image: registry:2.8.3 | |
| networks: | |
| - registry | |
| registry-browser: | |
| image: klausmeyer/docker-registry-browser:latest | |
| networks: | |
| - web | |
| - registry | |
| labels: | |
| - "traefik.enable=true" | |
| - "traefik.http.routers.registry.rule=Host(`registry.arsalanse.ir`)" | |
| - "traefik.http.routers.registry.entrypoints=http" | |
| - "traefik.http.services.registry.loadbalancer.server.port=8080" | |
| - "traefik.http.routers.whoami.middlewares=nforwardauth" | |
| environment: | |
| - 'DOCKER_REGISTRY_URL=https://registry:5000' | |
| - 'NO_SSL_VERIFICATION=true' | |
| # openssl rand -hex 64 | |
| - 'SECRET_KEY_BASE=xxxxxxxxxxxx' | |
| networks: | |
| registry: | |
| web: | |
| external: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # echo "test:$(mkpasswd -m sha-512 test)" >> ./passwd | |
| admin:xxxxxxxxxxxx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment