nitro-stack/stack-orchestrator/config/go-nitro/create-certs.sh
Adwait Gharpure e3a8b25850 Update nitro-node stack setup (#5)
* Rename service for nitro node

* Update nitro node setup

* Rename nitro-contracts image to nitro-client

* Fix nitro node config setup

* Add env variable for deterministic deployment

* Keep nitro-contracts service running

* Start nitro-bridge service after asset file is ready

* Update environment variables for all services

* Use quotes for bridge address

* Update nitro-node and bridge stack readme

* Fix nitro-node readme

---------

Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
2024-07-23 12:23:48 +05:30

21 lines
535 B
Bash
Executable File

#!/bin/bash
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
cert_file="/app/tls/statechannels.org.pem"
key_file="/app/tls/statechannels.org_key.pem"
# Check if the cert already exists
if [ -f "$cert_file" ] ; then
echo "Cert file ${cert_file} already exists"
else
echo "Creating certs"
mkcert -cert-file $cert_file -key-file $key_file statechannels.org localhost 127.0.0.1 $NITRO_PUBLIC_RPC_HOST ::1
# Copy over the rootCA cert so that it can be used by the client
cp -r $(mkcert -CAROOT)/* /app/mkcert-caroot
fi