feat: Add docker registry
This commit is contained in:
parent
95d6974288
commit
c31926db99
1
registry/.env.example
Normal file
1
registry/.env.example
Normal file
@ -0,0 +1 @@
|
|||||||
|
REGISTRY_HOST=registy.example.org
|
||||||
2
registry/.gitignore
vendored
Normal file
2
registry/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
registry/
|
||||||
9
registry/README.md
Normal file
9
registry/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# About Registy
|
||||||
|
|
||||||
|
# How to setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p registry/data
|
||||||
|
docker run --rm -it httpd htpasswd -Bbn test test > ./registry/registry.password
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
28
registry/docker-compose.yml
Normal file
28
registry/docker-compose.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
registry:
|
||||||
|
restart: always
|
||||||
|
image: registry:latest
|
||||||
|
environment:
|
||||||
|
REGISTRY_AUTH: htpasswd
|
||||||
|
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
|
||||||
|
REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password
|
||||||
|
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
|
||||||
|
volumes:
|
||||||
|
# Mount the password file
|
||||||
|
- ./registry/registry.password:/auth/registry.password
|
||||||
|
# Mount the data directory
|
||||||
|
- ./registry/data:/data
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
|
||||||
|
- "traefik.http.services.registry.loadbalancer.server.port=5000"
|
||||||
|
|
||||||
|
- "traefik.http.routers.plausible.entrypoints=web"
|
||||||
|
- "traefik.http.routers.plausible.middlewares=https-redirect@docker"
|
||||||
|
- "traefik.http.routers.registry.rule=Host(`${REGISTRY_HOST}`)"
|
||||||
|
|
||||||
|
- "traefik.http.routers.registry-https.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.registry-https.tls=true"
|
||||||
|
- "traefik.http.routers.registry-https.tls.certresolver=letsencrypt"
|
||||||
|
- "traefik.http.routers.registry-https.rule=Host(`${REGISTRY_HOST}`)"
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
@ -1,5 +1,3 @@
|
|||||||
version: "3.3"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
web:
|
web:
|
||||||
external: true
|
external: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user