inital commit
continuous-integration/drone Build is failing Details

This commit is contained in:
Roxie Gibson 2021-11-11 10:55:15 +00:00
commit a2dee7c438
Signed by untrusted user: roxxers
GPG Key ID: 5D0140EDEE123F4D
4 changed files with 31 additions and 0 deletions

22
.drone.yml Normal file
View File

@ -0,0 +1,22 @@
---
kind: pipeline
name: docker-publish
steps:
- name: publish image
image: plugins/docker
settings:
auto_tag: true
username: thecoopcloud
password:
from_secret: thecoopcloud_password
repo: thecoopcloud/traefik-cert-dumper
tags: latest
when:
event:
exclude:
- pull_request
trigger:
branch:
- main

4
DockerFile Normal file
View File

@ -0,0 +1,4 @@
FROM ldez/traefik-certs-dumper:2.7.4
COPY entrypoint.sh /opt/entrypoint.sh
COPY post-script.sh /opt/post-hook.sh
ENTRYPOINT /opt/entrypoint.sh

4
entrypoint.sh Normal file
View File

@ -0,0 +1,4 @@
while ! [ -e /traefik/production-acme.json ] || ! [ `jq ".production.Certificates | length" /traefik/production-acme.json` != 0 ]; do
sleep 1
; done
&& traefik-certs-dumper file --watch --source /traefik/production-acme.json --dest /output --domain-subdir=true --version v2 --post-hook "/opt/post-hook.sh"

1
post-hook.sh Normal file
View File

@ -0,0 +1 @@
find /output/ -depth -type d ! -name "${DOMAIN}" ! -name "." -execdir rm -r "{}" +