Skip to main content

ENV variables which are used to setup OpenSign™ with Docker on Localhost

Information About ENV variables which are used to setup OpenSign™ with Docker on Localhost

To set up OpenSign™ locally using Docker, the following prerequisites are required:

Environment Varaibles:

Environment VaribaleValueDescription
PUBLIC_URLhttp://localhost:3000Set it to the URL form where the app home page will be accessed
GENERATE_SOURCEMAPfalseSet it to true if you want to generate the Sourcemap for debugging
REACT_APP_SERVERURLhttp://localhost:8080/appSet it to the URL from where APIs will be accessible, for local development it should be localhost:8080/app (use your local port number instead)
REACT_APP_APPIDopensignstgnA 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API.
APP_IDopensignstgnA 12 character long random app identifier. The value of this should be same as REACT_APP_APPID which is a variable used by Frontend React App.
appNameopen_sign_serverName of the app. It will be visible in the verification emails sent out.
MASTER_KEYXnAadwKxxByMrA 12 character long random secret key that allows access to all the data. It is used in Parse dashboard config to view all the data in the database.
MONGODB_URImongodb://host.docker.internal:27017/OpenSignDBMongodb URI to connect to
PARSE_MOUNT/appPath on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions.
SERVER_URLhttp://localhost:8080/appSet it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:8080/app (use your local port number instead)
DO_SPACEDOSPACENAMEDigital ocean space name or AWS S3 bucket name for uploading documents
DO_ENDPOINTams3.digitaloceanspaces.comDigital ocean spaces endpoint or AWS S3 endpoint for uploading documents
DO_BASEURLhttps://DOSPACENAME.ams3.digitaloceanspaces.comDigital ocean baseurl or AWS S3 base URL
DO_ACCESS_KEY_IDYOUR_S3_ACCESS_IDDigital ocean spaces access key ID or AWS s3 Access key ID for uploading the docs
DO_SECRET_ACCESS_KEYYOUR_S3_ACCESS_KEYDigital ocean spaces secret access key or AWS s3 secret access key for uploading the docs
DO_REGIONYOUR_S3_REGIONDigital ocean spaces region or AWS s3 region
USE_LOCALFALSETo use local file storage to save file
MAILGUN_API_KEYYOUR_MAILGUNAPI_KEYMailgun API Key
MAILGUN_DOMAINYOUR_MAILGUNAPI_DOMAINMailgun API Domain
MAILGUN_SENDER-Mailgun Sender Mail ID
PFX_BASE64-Base64 encoded PFX or p12 document signing certificate file. You can generate base64 encoded self sign certificate using the passphrase.
PASS_PHRASEopensignPass phrase of PFX or p12 document signing certificate file.

Steps to generate self-signed document singing certificate

# execute below command and use passphrase 'opensign'
openssl genrsa -des3 -out ./local_dev.key 2048
openssl req -key ./local_dev.key -new -x509 -days 365 -out ./local_dev.crt
openssl pkcs12 -inkey ./local_dev.key -in ./local_dev.crt -export -out ./local_dev.pfx
openssl base64 -in ./local_dev.pfx -out ./base64_pfx