Compare commits
No commits in common. "eed475446d869e1c9e06476a861392e9b9bc83f6" and "5c44c190607cc2d5c05b28a4f52f4c8971ad1ffc" have entirely different histories.
eed475446d
...
5c44c19060
7 changed files with 72 additions and 85 deletions
|
@ -1,2 +0,0 @@
|
||||||
ci/
|
|
||||||
README.md
|
|
|
@ -1,7 +1,9 @@
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
RUN apk add --no-cache --upgrade \
|
RUN apk add \
|
||||||
curl certbot openssl
|
curl \
|
||||||
|
certbot \
|
||||||
|
openssl
|
||||||
|
|
||||||
RUN mkdir -p /etc/periodic/12h \
|
RUN mkdir -p /etc/periodic/12h \
|
||||||
&& mkdir -p /etc/periodic/5min
|
&& mkdir -p /etc/periodic/5min
|
||||||
|
@ -9,7 +11,5 @@ RUN mkdir -p /etc/periodic/12h \
|
||||||
COPY certbot-* duckdns start-certbot-duckdns.sh /usr/local/bin/
|
COPY certbot-* duckdns start-certbot-duckdns.sh /usr/local/bin/
|
||||||
COPY etc/periodic/ /etc/periodic/
|
COPY etc/periodic/ /etc/periodic/
|
||||||
|
|
||||||
VOLUME /etc/letsencrypt/
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/sh", "-c" ]
|
ENTRYPOINT [ "/bin/sh", "-c" ]
|
||||||
CMD [ "duckdns; certbot-duckdns; start-certbot-duckdns.sh" ]
|
CMD [ "duckdns; certbot-duckdns; start-certbot-duckdns.sh" ]
|
||||||
|
|
35
arch.txt
Normal file
35
arch.txt
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
aarch64
|
||||||
|
# aarch64_be
|
||||||
|
# alpha
|
||||||
|
arm
|
||||||
|
# armeb
|
||||||
|
# cris
|
||||||
|
# hppa
|
||||||
|
i386
|
||||||
|
# m68k
|
||||||
|
# microblaze
|
||||||
|
# microblazeel
|
||||||
|
# mips
|
||||||
|
# mips64
|
||||||
|
# mips64el
|
||||||
|
# mipsel
|
||||||
|
# mipsn32
|
||||||
|
# mipsn32el
|
||||||
|
# nios2
|
||||||
|
# or1k
|
||||||
|
# ppc
|
||||||
|
# ppc64
|
||||||
|
# ppc64abi32
|
||||||
|
ppc64le
|
||||||
|
# riscv32
|
||||||
|
# riscv64
|
||||||
|
s390x
|
||||||
|
# sh4
|
||||||
|
# sh4eb
|
||||||
|
# sparc
|
||||||
|
# sparc32plus
|
||||||
|
# sparc64
|
||||||
|
# tilegx
|
||||||
|
x86_64
|
||||||
|
# xtensa
|
||||||
|
# xtensaeb
|
30
build.sh
Executable file
30
build.sh
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
platforms() {
|
||||||
|
plat="$(grep '^[^#].*' < arch.txt)"
|
||||||
|
arch_count="$(echo "$plat" | wc -l)"
|
||||||
|
echo "$plat" | tr '\n' ',' | cut -d, -f1-$arch_count
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
docker buildx create --use
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
tagname="$1"
|
||||||
|
docker pull 'alpine:latest'
|
||||||
|
docker buildx build --push --tag="$tagname" --platform="$(platforms)" .
|
||||||
|
}
|
||||||
|
|
||||||
|
get_tag() {
|
||||||
|
git rev-parse --short HEAD
|
||||||
|
}
|
||||||
|
|
||||||
|
deploy() {
|
||||||
|
tag0="redxef/certbot-duckdns:$(get_tag)"
|
||||||
|
tag1="redxef/certbot-duckdns:latest"
|
||||||
|
build "$tag0"
|
||||||
|
build "$tag1"
|
||||||
|
}
|
||||||
|
|
||||||
|
"$@"
|
|
@ -14,4 +14,6 @@ for i in $(seq 0 60); do
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "waiting 60s for propagation"
|
||||||
|
sleep 60
|
||||||
test "$result" = 'OK'
|
test "$result" = 'OK'
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
---
|
|
||||||
resources:
|
|
||||||
- name: source
|
|
||||||
type: git
|
|
||||||
source:
|
|
||||||
uri: https://gitea.redxef.at/redxef/certbot-duckdns
|
|
||||||
branch: master
|
|
||||||
fetch_tags: true
|
|
||||||
- name: upstream-image
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: alpine
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- name: build-push
|
|
||||||
plan:
|
|
||||||
- get: source
|
|
||||||
trigger: true
|
|
||||||
- get: upstream-image
|
|
||||||
trigger: true
|
|
||||||
- task: compute-docker-tags
|
|
||||||
config:
|
|
||||||
platform: linux
|
|
||||||
image_resource:
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: alpine/git
|
|
||||||
inputs:
|
|
||||||
- name: source
|
|
||||||
path: .
|
|
||||||
outputs:
|
|
||||||
- name: docker-tags
|
|
||||||
run:
|
|
||||||
path: sh
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
#!/usr/bin/env sh
|
|
||||||
git rev-parse --short HEAD > docker-tags/tags.txt
|
|
||||||
git show-ref --tags | \
|
|
||||||
sed -n "/$(git rev-parse HEAD)/ s|$(git rev-parse HEAD).refs/tags/||gp" \
|
|
||||||
>> docker-tags/tags.txt
|
|
||||||
- task: build
|
|
||||||
privileged: true
|
|
||||||
config:
|
|
||||||
platform: linux
|
|
||||||
image_resource:
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: redxef/concourse-buildkit
|
|
||||||
inputs:
|
|
||||||
- name: source
|
|
||||||
path: .
|
|
||||||
- name: docker-tags
|
|
||||||
params:
|
|
||||||
username: ((docker.username))
|
|
||||||
password: ((docker.password))
|
|
||||||
repository: docker.io/redxef/certbot-duckdns
|
|
||||||
tag: latest
|
|
||||||
additional_tags: docker-tags/tags.txt
|
|
||||||
push: true
|
|
||||||
platform: aarch64,arm,i386,ppc64le,s390x,x86_64
|
|
||||||
context: .
|
|
||||||
manual: false
|
|
||||||
run:
|
|
||||||
path: build
|
|
|
@ -9,18 +9,10 @@ one for the domain and one wildcard cert.
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```
|
|
||||||
docker run --rm \
|
|
||||||
-e DUCKDNS_DOMAIN=redxef \
|
|
||||||
-e DUCKDNS_TOKEN=<your ddns token> \
|
|
||||||
-e LE_EMAIL=noreply@example.com \
|
|
||||||
redxef/certbot-duckdns
|
|
||||||
```
|
|
||||||
|
|
||||||
`DUCKDNS_DOMAIN=redxef`
|
`DUCKDNS_DOMAIN=redxef`
|
||||||
|
|
||||||
Yields 2 certificates, the first being for redxef.duckdns.org and the
|
Yields 2 certificates, the first being for redxef.duckdns.org and the
|
||||||
second being for \*.redxef.duckdns.org. These certificates can be found
|
second being for *.redxef.duckdns.org. These certificates can be found
|
||||||
under the following locations respectively:
|
under the following locations respectively:
|
||||||
|
|
||||||
- `/etc/letsencrypt/live/redxef.duckdns.org/`
|
- `/etc/letsencrypt/live/redxef.duckdns.org/`
|
||||||
|
@ -31,7 +23,3 @@ under the following locations respectively:
|
||||||
- DUCKDNS_DOMAIN: The domain to update, ex: DUCKDNS_DOMAIN=redxef for redxef.duckdns.org
|
- DUCKDNS_DOMAIN: The domain to update, ex: DUCKDNS_DOMAIN=redxef for redxef.duckdns.org
|
||||||
- DUCKDNS_TOKEN: Your duckdns api token
|
- DUCKDNS_TOKEN: Your duckdns api token
|
||||||
- LE_EMAIL: Your email for certificate related notifications
|
- LE_EMAIL: Your email for certificate related notifications
|
||||||
|
|
||||||
## SOURCE
|
|
||||||
|
|
||||||
[gitea.redxef.at/redxef/certbot-duckdns](https://gitea.redxef.at/redxef/certbot-duckdns)
|
|
Loading…
Reference in a new issue