# acmesh **Repository Path**: tinyhare/acmesh ## Basic Information - **Project Name**: acmesh - **Description**: 基于acme.sh制作的docker 镜像和 compose文件,使用docker compose 管理自己写的插件,打包镜像,运行证书的自动签发和部署。 - **Primary Language**: 其他 - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-21 - **Last Updated**: 2024-06-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Authentication key generation Use SSH nopassword login to deploy cert ```sh ssh-keygen -t rsa -b 2048 -f id_rsa -P '' mkdir -p root_path/root/.ssh/ cp id_rsa* root_path/root/.ssh/ ``` # Build docker image ```sh docker compose build acme.sh ``` # Run ```sh docker compose up -d acme.sh ``` You can set environment variables in compose.yaml or by -e as following examples. # Usage use 'docker compose exec ' as prefix to run acme.sh command. # Example Issue with DNS alias mode, and deploy to ali CDN cert: abc.example.com DNS alias: alias.com **Step 1: Add CNAME record to example.com** ``` _acme-challenge.abc.example.com CNAME _acme-challenge.alias.com ``` **Step 2: Issue** ```sh docker compose exec -e Ali_Key=xxxxxx -e Ali_Secret=yyyyyy \ acme.sh --issue -d abc.example.com --challenge-alias alias.com --dns dns_ali ``` **Step 3: Deploy** ```sh docker compose exec -e DEPLOY_ALI_CDN_ID=xxxxxx -e DEPLOY_ALI_CDN_SECRET=xxxxx \ acme.sh --deploy -d abc.example.com --deploy-hook ali_cdn ``` You can use multy -deploy-hook at the same time, don't forget to set environment variables they need by -e. ** Renew ** ```sh docker compose exec acme.sh --renew --force -d abc.example.com ```