switch to custom caddy with route53 dns support
All checks were successful
Podman DDNS Image / build-and-push-ddns (push) Successful in 2m21s
All checks were successful
Podman DDNS Image / build-and-push-ddns (push) Successful in 2m21s
This commit is contained in:
30
.gitea/workflows/caddy.yaml
Normal file
30
.gitea/workflows/caddy.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Podman DDNS Image
|
||||||
|
run-name: Build and Push the Custom Caddy Image with Route53 DNS Certbot
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- active/podman_caddy/**
|
||||||
|
- .gitea/workflows/caddy.yaml
|
||||||
|
schedule:
|
||||||
|
- cron: '@daily'
|
||||||
|
jobs:
|
||||||
|
build-and-push-ddns:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: gitea.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Login to Gitea Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: gitea.reeseapps.com
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: https://github.com/docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ${{ gitea.workspace }}/active/podman_caddy
|
||||||
|
file: ${{ gitea.workspace }}/active/podman_caddy/Containerfile
|
||||||
|
push: true
|
||||||
|
tags: "gitea.reeseapps.com/services/caddy:latest,gitea.reeseapps.com/services/caddy:${{gitea.sha}}"
|
||||||
|
no-cache: true
|
||||||
8
active/podman_caddy/Containerfile
Normal file
8
active/podman_caddy/Containerfile
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
FROM docker.io/caddy:2-builder AS builder
|
||||||
|
|
||||||
|
RUN xcaddy build \
|
||||||
|
--with github.com/caddy-dns/route53@v1.6.0
|
||||||
|
|
||||||
|
FROM docker.io/caddy:2
|
||||||
|
|
||||||
|
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||||
@@ -4,7 +4,7 @@ Description=Caddy
|
|||||||
[Container]
|
[Container]
|
||||||
AddCapability=NET_ADMIN
|
AddCapability=NET_ADMIN
|
||||||
ContainerName=caddy
|
ContainerName=caddy
|
||||||
Image=docker.io/caddy:2
|
Image=gitea.reeseapps.com/services/caddy:latest
|
||||||
Network=host
|
Network=host
|
||||||
SecurityLabelDisable=true
|
SecurityLabelDisable=true
|
||||||
Volume=/etc/caddy:/etc/caddy
|
Volume=/etc/caddy:/etc/caddy
|
||||||
|
|||||||
@@ -1,11 +1,24 @@
|
|||||||
# Caddy Reverse Proxy
|
# Caddy Reverse Proxy
|
||||||
|
|
||||||
- [Caddy Reverse Proxy](#caddy-reverse-proxy)
|
- [Caddy Reverse Proxy](#caddy-reverse-proxy)
|
||||||
|
- [Custom Caddy Image](#custom-caddy-image)
|
||||||
- [Install Caddy](#install-caddy)
|
- [Install Caddy](#install-caddy)
|
||||||
- [Ansible](#ansible)
|
- [Ansible](#ansible)
|
||||||
- [Manual](#manual)
|
- [Manual](#manual)
|
||||||
- [Adding a new Caddy Record](#adding-a-new-caddy-record)
|
- [Adding a new Caddy Record](#adding-a-new-caddy-record)
|
||||||
|
|
||||||
|
## Custom Caddy Image
|
||||||
|
|
||||||
|
This repo builds a custom caddy image with route53 DNS certbot support.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
podman image pull gitea.reeseapps.com/services/caddy:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
To upgrade the image, check [the caddy-dns route53
|
||||||
|
project](https://github.com/caddy-dns/route53/tags) releases and update the
|
||||||
|
`Containerfile` with the new version.
|
||||||
|
|
||||||
## Install Caddy
|
## Install Caddy
|
||||||
|
|
||||||
### Ansible
|
### Ansible
|
||||||
|
|||||||
Reference in New Issue
Block a user