mirror of
https://github.com/KevinMidboe/nginx.git
synced 2025-10-29 09:40:26 +00:00
Volumes for persistent /etc/letsencrypt & /etc/ssl
This commit is contained in:
36
.drone.yml
36
.drone.yml
@@ -17,6 +17,12 @@ clone:
|
|||||||
environment:
|
environment:
|
||||||
NGINX_VERSION: 1.24.0
|
NGINX_VERSION: 1.24.0
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: letsencrypt
|
||||||
|
temp: {}
|
||||||
|
- name: ssl
|
||||||
|
temp: {}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone w/ submodules
|
- name: Clone w/ submodules
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
@@ -25,11 +31,16 @@ steps:
|
|||||||
- git checkout $DRONE_COMMIT
|
- git checkout $DRONE_COMMIT
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Verify config
|
- name: Setup environment
|
||||||
image: ubuntu/nginx:1.24-23.10_beta
|
image: alpine:3.18.4
|
||||||
|
volumes:
|
||||||
|
- name: letsencrypt
|
||||||
|
path: /etc/letsencrypt
|
||||||
|
- name: ssl
|
||||||
|
path: /etc/ssl
|
||||||
commands:
|
commands:
|
||||||
- apt update
|
- apk update
|
||||||
- apt install openssl
|
- apk add openssl
|
||||||
- cd $DRONE_WORKSPACE
|
- cd $DRONE_WORKSPACE
|
||||||
- mkdir .ssl
|
- mkdir .ssl
|
||||||
- openssl req
|
- openssl req
|
||||||
@@ -55,6 +66,14 @@ steps:
|
|||||||
awk -F ' ' '{print $2}' RS=';' |
|
awk -F ' ' '{print $2}' RS=';' |
|
||||||
while read -r file; do if [ ! -z $file ]; then ln -sf $PWD/.ssl/ssl-cert-snakeoil.key $file; fi; done
|
while read -r file; do if [ ! -z $file ]; then ln -sf $PWD/.ssl/ssl-cert-snakeoil.key $file; fi; done
|
||||||
|
|
||||||
|
- name: Verify config
|
||||||
|
image: ubuntu/nginx:1.24-23.10_beta
|
||||||
|
volumes:
|
||||||
|
- name: letsencrypt
|
||||||
|
path: /etc/letsencrypt
|
||||||
|
- name: ssl
|
||||||
|
path: /etc/ssl
|
||||||
|
commands:
|
||||||
- nginx -p $DRONE_WORKSPACE -c $DRONE_WORKSPACE/nginx.conf -t
|
- nginx -p $DRONE_WORKSPACE -c $DRONE_WORKSPACE/nginx.conf -t
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
@@ -87,8 +106,13 @@ steps:
|
|||||||
|
|
||||||
- name: Verify config post build
|
- name: Verify config post build
|
||||||
image: ubuntu/nginx:1.24-23.10_beta
|
image: ubuntu/nginx:1.24-23.10_beta
|
||||||
|
volumes:
|
||||||
|
- name: letsencrypt
|
||||||
|
path: /etc/letsencrypt
|
||||||
|
- name: ssl
|
||||||
|
path: /etc/ssl
|
||||||
commands:
|
commands:
|
||||||
- nginx -t
|
- nginx -p $DRONE_WORKSPACE -c $DRONE_WORKSPACE/nginx.conf -t
|
||||||
|
|
||||||
- name: Setup credentials
|
- name: Setup credentials
|
||||||
image: alpine:3.18.4
|
image: alpine:3.18.4
|
||||||
@@ -126,6 +150,6 @@ steps:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 03972a40959e14601d6c922c10f2d96f77f84f1ea88cc49e40aa0c69c755266b
|
hmac: 1b941ff6cc5afce923caebaee1724e778f9963e390bb0ddbbee7c123b17e4aed
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
Reference in New Issue
Block a user