From 57a5b0d58d81be223410350ad083c2ec6c02aa2e Mon Sep 17 00:00:00 2001 From: Duy Dao Date: Wed, 16 Jul 2025 10:13:43 +0700 Subject: [PATCH] fix: update README links to point to the new GitHub repository and enhance installation instructions for Docker Compose --- README.md | 76 +++++++++++++++++++++++++------------------------------ 1 file changed, 34 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index e9ef86c..eca0654 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,12 @@

A UI for managing Caddy configuration files
- Explore the docs » + Explore the docs »

- Report Bug (label bug) + Report Bug (label bug) · - Request Feature (label enhancement) + Request Feature (label enhancement) [//]: # ( View Demo) @@ -125,52 +125,46 @@ These software are required to be installed on the host machine: - /path/to/configs:/etc/caddy ``` -### Installation +### Global Caddy configuration -This repository can be cloned and then built with DotNet. Using the `dotnet publish` command can have the container image built and pushed to the registry. +Add this directive at the end of your caddy configuration (global): -1. Clone the repo - ```shell - git clone https://pikachu-gitea.duydao.org/ebolo/CaddyManager.git - cd CaddyManager - ``` -2. Login to the container registry (optional, only need to publish to a remote registry) - ```shell - docker login -u $USER_NAME $REGISTRY_URL - ``` -3. Build and publish container with DotNet - ```shell - 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 - ``` +``` +import *.caddy +``` + +This is to have the caddy files managed by this application be imported and work as expected. + +### Installation with Docker compose -Then the container can be run with Docker compose: ```yaml services: caddy: - image: caddy-manager:latest + image: caddy:latest + container_name: caddy + restart: always + network_mode: "host" + security_opt: + - label:disable + volumes: + - /root/compose/caddy/config:/etc/caddy + - /etc/localtime:/etc/localtime:ro + + caddy-manager: + image: ghcr.io/daothanhduy305/caddymanager container_name: caddy-manager restart: always environment: - - Caddy__ConfigDir=/config # The directory where Caddy configuration files are stored - - Docker__CaddyContainerName=caddy # The name of the Caddy container - user: "${UID}:${GID}" - # The user and group ID of the host user having the permission to write to the Caddy configuration directory + ASPNETCORE_ENVIRONMENT: "Production" + CaddyService__ConfigDir: "/config" + DockerService__CaddyContainerName: "caddy" + # To have the access to the caddy config file + user: "1000:1000" ports: - "8080:8080" volumes: - /root/compose/caddy/config:/config - /var/run/docker.sock:/var/run/docker.sock - -``` - -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 -UID=1000 # can be 0 as root user -GID=1000 # can be 0 as root group ```

(back to top)

@@ -180,15 +174,13 @@ GID=1000 # can be 0 as root group ## Usage -TBU. - Currently, the Caddy Manager is able to: - List all the Caddy configuration files - Edit the content of the Caddy configuration files by clicking on the file name -- Create a new Caddy configuration file by clicking on the "New" button -- Delete a Caddy configuration file by clicking on the "Delete" button +- Create and manage the caddy files - Edit the global Caddy configuration file by using the tab "Global Cadddyfile" -- Have the Caddy container be restarted by clicking on the "Restart" button +- Restart caddy container on demand +- Parse simple information from the caddy configurations

(back to top)

@@ -199,7 +191,7 @@ Currently, the Caddy Manager is able to: - [x] Parse the caddy files to get more information, i.e. the domain names, the proxy addresses, etc. -See the [open issues](https://pikachu-gitea.duydao.org/ebolo/CaddyManager/issues) for a full list of proposed features (and known issues). +See the [open issues](https://github.com/daothanhduy305/CaddyManager/issues) for a full list of proposed features (and known issues).

(back to top)

@@ -234,7 +226,7 @@ Distributed under the GNU GPLv3 License. See `COPYING` for more information. Ebolo - [@duydao](https://duydao.org) - daothanhduy305@gmail.com -Project Link: [CaddyManager](https://pikachu-gitea.duydao.org/ebolo/CaddyManager) +Project Link: [CaddyManager](https://github.com/daothanhduy305/CaddyManager)

(back to top)