feat: omit the user repo in container registry
All checks were successful
Caddy Manager CI build / docker (push) Successful in 48s

This commit is contained in:
2025-01-26 12:32:10 +07:00
parent 70b1416b77
commit a8a0475917
3 changed files with 11 additions and 6 deletions

View File

@@ -38,4 +38,5 @@ jobs:
run: | run: |
dotnet publish \ dotnet publish \
--configuration Release --os linux --arch x64 \ --configuration Release --os linux --arch x64 \
/t:PublishContainer -p ContainerRegistry=${{ vars.DOCKER_GITEA_DOMAIN }} /t:PublishContainer -p ContainerRegistry=${{ vars.DOCKER_GITEA_DOMAIN }} \
-p ContainerRepository=ebolo/caddy-manager

View File

@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<LangVersion>13</LangVersion> <LangVersion>13</LangVersion>
<ContainerRepository>ebolo/caddy-manager</ContainerRepository> <ContainerRepository>caddy-manager</ContainerRepository>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- To avoid error on lock file not found --> <!-- To avoid error on lock file not found -->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder> <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>

View File

@@ -131,7 +131,7 @@ This repository can be cloned and then built with DotNet. Using the `dotnet publ
git clone https://pikachu-gitea.duydao.org/ebolo/CaddyManager.git git clone https://pikachu-gitea.duydao.org/ebolo/CaddyManager.git
cd CaddyManager cd CaddyManager
``` ```
2. Login to the container registry 2. Login to the container registry (optional, only need to publish to a remote registry)
```shell ```shell
docker login -u $USER_NAME $REGISTRY_URL docker login -u $USER_NAME $REGISTRY_URL
``` ```
@@ -139,12 +139,16 @@ This repository can be cloned and then built with DotNet. Using the `dotnet publ
```shell ```shell
dotnet publish --os linux --arch x64 /t:PublishContainer -p ContainerRegistry=$REGISTRY_URL dotnet publish --os linux --arch x64 /t:PublishContainer -p ContainerRegistry=$REGISTRY_URL
``` ```
if publishing to only the local machine, the `ContainerRegistry` parameter can be omitted.
```shell
dotnet publish --os linux --arch x64 /t:PublishContainer
```
Then the container can be run with Docker compose: Then the container can be run with Docker compose:
```yaml ```yaml
services: services:
caddy: caddy:
image: $REGISTRY_URL/ebolo/caddy-manager:latest image: caddy-manager:latest
container_name: caddy-manager container_name: caddy-manager
restart: always restart: always
environment: environment:
@@ -162,8 +166,8 @@ services:
Example of `.env` file. The `UID` and `GID` are the user and group ID of the host user having the permission to write to the Caddy configuration directory: Example of `.env` file. The `UID` and `GID` are the user and group ID of the host user having the permission to write to the Caddy configuration directory:
```shell ```shell
UID=1000 UID=1000 # can be 0 as root user
GID=1000 GID=1000 # can be 0 as root group
``` ```
<p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p>