mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
updated nats-server wrapper
This commit is contained in:
parent
a0c211de4d
commit
f32f42d2ce
1 changed files with 15 additions and 4 deletions
|
@ -1,11 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
# TO USE:
|
||||
# ./wrapper ./le.crt ./le.key 50222
|
||||
# ./wrapper fqdn 50222
|
||||
|
||||
LE_CRT=$1
|
||||
LE_KEY=$2
|
||||
EXPOSED_NATS_PORT=$3
|
||||
FQDN=$1
|
||||
|
||||
if docker run -it --rm -v "$PWD:/certs/:rw" -p 80:80 -p 443:443 -e DAEMON=false -e USER_FOLDER=/certs -e PROD=false -e DOMAIN="$FQDN" certupdater:0.1.0; then
|
||||
echo " * successfully generated LetsEncrypt certificate"
|
||||
else
|
||||
echo " * failed to generate LetsEncrypt certificate."
|
||||
echo " * a docker image of cert updater need to be present on the host."
|
||||
echo " * Follow the instructions at https://github.com/RaaLabs/certupdater"
|
||||
echo " * to install it as a docker image."
|
||||
fi
|
||||
|
||||
LE_CRT=$PWD/$FQDN/$FQDN.crt
|
||||
LE_KEY=$PWD/$FQDN/$FQDN.key
|
||||
EXPOSED_NATS_PORT=$2
|
||||
|
||||
if go run ./steward/scripts/nats-server/generate-nkeys/main.go; then
|
||||
echo " * succesfully generated nkeys"
|
||||
|
|
Loading…
Reference in a new issue