diff options
| author | 2022-12-13 08:15:52 +0000 | |
|---|---|---|
| committer | 2022-12-13 08:15:52 +0000 | |
| commit | 1eb5c7a6e2f5436c8f0be77acc06672a5f24562a (patch) | |
| tree | 51098e478054a66439e98dfab89cbbedf5d9f5c0 /examples/nginx-alpine-ssl/entrypoint.sh | |
| parent | Backport from xs. (diff) | |
| parent | Add docker-compose support, so a working development server with HTTPS can be... (diff) | |
| download | snac2-1eb5c7a6e2f5436c8f0be77acc06672a5f24562a.tar.gz snac2-1eb5c7a6e2f5436c8f0be77acc06672a5f24562a.tar.xz snac2-1eb5c7a6e2f5436c8f0be77acc06672a5f24562a.zip | |
Merge pull request 'Add docker-compose support' (#22) from tobyjaffey/snac2:docker into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/22
Diffstat (limited to 'examples/nginx-alpine-ssl/entrypoint.sh')
| -rwxr-xr-x | examples/nginx-alpine-ssl/entrypoint.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/nginx-alpine-ssl/entrypoint.sh b/examples/nginx-alpine-ssl/entrypoint.sh new file mode 100755 index 0000000..5432d46 --- /dev/null +++ b/examples/nginx-alpine-ssl/entrypoint.sh | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | cd /etc/nginx/http.d; | ||
| 2 | export CRT="${CRT:=nginx-selfsigned.crt}"; | ||
| 3 | if [ -f "/etc/ssl/certs/$CRT" ] | ||
| 4 | then | ||
| 5 | # set crt file in the default.conf file | ||
| 6 | sed -i "/ssl_certificate \//c\\\tssl_certificate \/etc\/ssl\/certs\/$CRT;" default.conf; | ||
| 7 | fi | ||
| 8 | export KEY="${KEY:=nginx-selfsigned.key}"; | ||
| 9 | if [ -f "/etc/ssl/private/$KEY" ] | ||
| 10 | then | ||
| 11 | # set key file in the default.conf file | ||
| 12 | sed -i "/ssl_certificate_key \//c\\\tssl_certificate_key \/etc\/ssl\/private\/$KEY;" default.conf; | ||
| 13 | fi | ||
| 14 | nginx -g 'daemon off;'; nginx -s reload; | ||
| 15 | |||