first commit
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "443:443/udp"
|
||||
volumes:
|
||||
- ./data/caddy/data:/data
|
||||
- ./data/caddy/config:/config
|
||||
entrypoint: ["sh", "-c"]
|
||||
command:
|
||||
- |
|
||||
echo '${DOMAIN} {
|
||||
handle /v2/* {
|
||||
reverse_proxy registry:5000
|
||||
}
|
||||
handle {
|
||||
reverse_proxy auth:5000
|
||||
}
|
||||
}' | caddy run --adapter caddyfile --config -
|
||||
depends_on:
|
||||
- registry
|
||||
- auth
|
||||
networks:
|
||||
- registry_net
|
||||
|
||||
registry:
|
||||
image: registry:2
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
REGISTRY_AUTH: htpasswd
|
||||
REGISTRY_AUTH_HTPASSWD_REALM: Docker Registry
|
||||
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
|
||||
REGISTRY_STORAGE_DELETE_ENABLED: "true"
|
||||
volumes:
|
||||
- ./data/registry:/var/lib/registry
|
||||
- ./data/htpasswd:/auth:ro
|
||||
networks:
|
||||
- registry_net
|
||||
|
||||
auth:
|
||||
build: ./auth-app
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
ADMIN_USER: ${ADMIN_USER}
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
|
||||
SECRET_KEY: ${SECRET_KEY}
|
||||
DB_PATH: /data/users.db
|
||||
HTPASSWD_PATH: /auth/htpasswd
|
||||
volumes:
|
||||
- ./data/auth:/data
|
||||
- ./data/htpasswd:/auth
|
||||
networks:
|
||||
- registry_net
|
||||
|
||||
networks:
|
||||
registry_net:
|
||||
Reference in New Issue
Block a user