diff --git a/src/main/java/com/artipie/front/ui/repository/RepositoryTemplate.java b/src/main/java/com/artipie/front/ui/repository/RepositoryTemplate.java index f7fb90e..b9d3ca5 100644 --- a/src/main/java/com/artipie/front/ui/repository/RepositoryTemplate.java +++ b/src/main/java/com/artipie/front/ui/repository/RepositoryTemplate.java @@ -31,7 +31,9 @@ public final class RepositoryTemplate { /** * Pre-defined template names. */ - private static final List PREDEFINED = List.of("maven-group", "maven-proxy"); + private static final List PREDEFINED = List.of( + "maven-proxy", "docker-proxy", "file-proxy", "npm-proxy", "php-proxy", "pypi-proxy" + ); /** * Template engine. diff --git a/src/main/resources/html/repository/create b/src/main/resources/html/repository/create index 319aa92..3f0f64b 100644 --- a/src/main/resources/html/repository/create +++ b/src/main/resources/html/repository/create @@ -89,7 +89,7 @@ function formSubmit() { - +
diff --git a/src/main/resources/info/docker-proxy.info.html b/src/main/resources/info/docker-proxy.info.html new file mode 100644 index 0000000..886bcd7 --- /dev/null +++ b/src/main/resources/info/docker-proxy.info.html @@ -0,0 +1,3 @@ +Artipie Docker Proxy repository redirects all pull requests to specified remote registries. Storage is optional here: +if not added, no images will be cached and push to the repository is not allowed. +If storage is set, remote images are cached and push works as usual. diff --git a/src/main/resources/info/maven-group.info.html b/src/main/resources/info/maven-group.info.html deleted file mode 100644 index 38fb038..0000000 --- a/src/main/resources/info/maven-group.info.html +++ /dev/null @@ -1,8 +0,0 @@ -

To use Maven grouped (virtual) repository first create at least two Maven or Maven proxy repositories. -It can be either just a Maven repository or Maven proxy (mirror) repository. Then specify -https://central.artipie.com/{{user}}/{{repo}} as distribution management, or -repositories in pom.xml or as a mirror in settings.xml (see -more details in concrete repositories documentation). Then group repositories under -group-settings, pay attention that order does matter: first repository in the list will be -accessed first, then second, etc. Repository name should be fully formatted, include your username -prefix, e.g. {{user}}/maven.

\ No newline at end of file diff --git a/src/main/resources/template/default.template.yaml b/src/main/resources/template/default.template.yaml index 9fac2fc..1bd7afc 100644 --- a/src/main/resources/template/default.template.yaml +++ b/src/main/resources/template/default.template.yaml @@ -1,9 +1,3 @@ repo: type: {{type}} storage: default - permissions: - {{user}}: - - upload - - download - "*": - - download diff --git a/src/main/resources/template/docker-proxy.template.yaml b/src/main/resources/template/docker-proxy.template.yaml new file mode 100644 index 0000000..47a3ab3 --- /dev/null +++ b/src/main/resources/template/docker-proxy.template.yaml @@ -0,0 +1,7 @@ +repo: + type: docker-proxy + storage: default + # proxy for Docker registry + remotes: + - url: registry-1.docker.io + - url: mcr.microsoft.com diff --git a/src/main/resources/template/file-proxy.template.yaml b/src/main/resources/template/file-proxy.template.yaml new file mode 100644 index 0000000..e1dd17e --- /dev/null +++ b/src/main/resources/template/file-proxy.template.yaml @@ -0,0 +1,6 @@ +repo: + type: file-proxy + storage: default + # proxy some general file storage + remotes: + - uri: https://some-general-storage.com diff --git a/src/main/resources/template/maven-group.template.yaml b/src/main/resources/template/maven-group.template.yaml deleted file mode 100644 index 1a38a61..0000000 --- a/src/main/resources/template/maven-group.template.yaml +++ /dev/null @@ -1,14 +0,0 @@ -repo: - type: maven-group - storage: default - settings: - repositories: - - {{user}}/mprivate1 - - {{user}}/mprivate2 - - {{user}}/mproxy - permissions: - {{user}}: - - upload - - download - "*": - - download diff --git a/src/main/resources/template/maven-proxy.template.yaml b/src/main/resources/template/maven-proxy.template.yaml index 5112363..6d84d32 100644 --- a/src/main/resources/template/maven-proxy.template.yaml +++ b/src/main/resources/template/maven-proxy.template.yaml @@ -1,14 +1,6 @@ repo: type: maven-proxy storage: default - # proxy for Apache Maven central + # proxy for Apache Maven central (several remotes supported) remotes: - uri: https://repo.maven.apache.org/maven2 - cache: - storage: default - permissions: - {{user}}: - - upload - - download - "*": - - download diff --git a/src/main/resources/template/npm-proxy.template.yaml b/src/main/resources/template/npm-proxy.template.yaml new file mode 100644 index 0000000..2d1d76a --- /dev/null +++ b/src/main/resources/template/npm-proxy.template.yaml @@ -0,0 +1,6 @@ +repo: + type: npm-proxy + storage: default + # proxy for NPM public registry + remotes: + - uri: https://registry.npmjs.org diff --git a/src/main/resources/template/php-proxy.template.yaml b/src/main/resources/template/php-proxy.template.yaml new file mode 100644 index 0000000..96218b0 --- /dev/null +++ b/src/main/resources/template/php-proxy.template.yaml @@ -0,0 +1,6 @@ +repo: + type: php-proxy + storage: default + # proxy for php composer central repository + remotes: + - uri: https://packagist.org/ diff --git a/src/main/resources/template/pypi-proxy.template.yaml b/src/main/resources/template/pypi-proxy.template.yaml new file mode 100644 index 0000000..9f31a0e --- /dev/null +++ b/src/main/resources/template/pypi-proxy.template.yaml @@ -0,0 +1,6 @@ +repo: + type: pypi-proxy + storage: default + # proxy for PyPI repository + remotes: + - uri: https://pypi.org/pypi