Finally get run.sh working properly
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
918e5edf18
commit
f4d03d5190
3 changed files with 5 additions and 8 deletions
|
@ -1,6 +1,5 @@
|
||||||
FROM python:3.12-alpine
|
FROM python:3.12-alpine
|
||||||
WORKDIR /etc/nginx
|
|
||||||
RUN pip install certbot certbot-nginx --no-cache-dir
|
RUN pip install certbot certbot-nginx --no-cache-dir
|
||||||
RUN apk add nginx --no-cache
|
RUN apk add nginx --no-cache
|
||||||
COPY run.sh /root
|
ADD run.sh /root/run.sh
|
||||||
CMD ["/root/run.sh"]
|
CMD [ "/root/run.sh" ]
|
|
@ -9,7 +9,7 @@
|
||||||
Example `docker run`:
|
Example `docker run`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d -e CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare -v ./nginx-conf:/etc/nginx docker.askiiart.net/askiiart/certbot-nginx certbot --version
|
docker run -d -v ./nginx-conf:/etc/nginx docker.askiiart.net/askiiart/certbot-nginx certbot --version
|
||||||
```
|
```
|
||||||
|
|
||||||
Example `docker-compose.yml`:
|
Example `docker-compose.yml`:
|
||||||
|
@ -19,8 +19,6 @@ version: '3.7'
|
||||||
services:
|
services:
|
||||||
hugo:
|
hugo:
|
||||||
image: docker.askiiart.net/askiiart/certbot-nginx
|
image: docker.askiiart.net/askiiart/certbot-nginx
|
||||||
environment:
|
|
||||||
- CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx-conf:/etc/nginx
|
- ./nginx-conf:/etc/nginx
|
||||||
command: certbot --version
|
command: certbot --version
|
||||||
|
|
4
run.sh
4
run.sh
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -z "$CERTBOT_DNS_PLUGIN" ]; then
|
if [ -z "$CERTBOT_DNS_PLUGIN" ]; then
|
||||||
echo "No DNS plugin set, continuing"
|
echo "No DNS plugin set, skipping"
|
||||||
else
|
else
|
||||||
pip install $CERTBOT_DNS_PLUGIN
|
pip install $CERTBOT_DNS_PLUGIN
|
||||||
fi
|
fi
|
||||||
|
|
||||||
certbot $@
|
sh -c $@
|
||||||
|
|
Loading…
Reference in a new issue