Initial commit, definitely not done yet

This commit is contained in:
askiiart 2023-11-13 22:08:27 -06:00
commit 295edcd693
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
5 changed files with 73 additions and 0 deletions

14
.drone.yml Normal file
View file

@ -0,0 +1,14 @@
kind: pipeline
name: default
steps:
- name: build and push
image: plugins/docker
pull: always
settings:
repo: askiiart/certbot-nginx
tags: latest
username:
from_secret: docker_username
password:
from_secret: docker_password

6
Dockerfile Normal file
View file

@ -0,0 +1,6 @@
FROM python:3.12-alpine
WORKDIR /etc/nginx
RUN pip install certbot certbot-nginx
RUN apk add nginx
COPY run.sh /root
ENTRYPOINT ["/root/run.sh"]

37
README.md Normal file
View file

@ -0,0 +1,37 @@
# docker-createrepo_c
[![Build Status](https://drone.askiiart.net/api/badges/askiiart/docker-certbot-nginx/status.svg?ref=refs/heads/main)](https://drone.askiiart.net/askiiart/docker-certbot-nginx)
`createrepo_c` in a Docker container
## Running
Example `docker run`:
```bash
docker run -d -e CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare -v ./nginx-conf:/etc/nginx docker.askiiart.net/askiiart/certbot-nginx --version
```
Example `docker-compose.yml`:
```yaml
version: '3.7'
services:
hugo:
image: docker.askiiart.net/askiiart/certbot-nginx
environment:
- CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare
volumes:
- ./nginx-conf:/etc/nginx
command: --version
```
### Environment Variables
| Variable | Description | Default |
| ------------------ | ----------------------------- | ------- |
| CERTBOT_DNS_PLUGIN | The certbot dns plugin to use | none |
## Building
1. Run `docker build .`

8
build-and-push.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
ORG=askiiart
NAME=certbot-nginx
ID=$(docker build . -q)
docker tag ${ID} ${ORG}/${NAME}:latest
docker push ${ORG}/${NAME}:latest

8
run.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
if [ -z "$CERTBOT_DNS_PLUGIN" ]; then
echo "No DNS plugin set, continuing"
else
pip install $CERTBOT_DNS_PLUGIN
fi
certbot $@