mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-20 22:52:39 +02:00
111 lines
34 KiB
HTML
111 lines
34 KiB
HTML
<!doctype html>
|
||
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-contribute/INSTALLATION" data-has-hydrated="false">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="generator" content="Docusaurus v3.0.1">
|
||
<title data-rh="true">INSTALLATON INSTRUCTIONS | OpenSign™</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://docs.opensignlabs.com/img/docusaurus-social-card.png"><meta data-rh="true" name="twitter:image" content="https://docs.opensignlabs.com/img/docusaurus-social-card.png"><meta data-rh="true" property="og:url" content="https://docs.opensignlabs.com/docs/contribute/INSTALLATION"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="INSTALLATON INSTRUCTIONS | OpenSign™"><meta data-rh="true" name="description" content="You can use our app as a cloud version from OpenSignLabs"><meta data-rh="true" property="og:description" content="You can use our app as a cloud version from OpenSignLabs"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.opensignlabs.com/docs/contribute/INSTALLATION"><link data-rh="true" rel="alternate" href="https://docs.opensignlabs.com/docs/contribute/INSTALLATION" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.opensignlabs.com/docs/contribute/INSTALLATION" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="OpenSign™ RSS Feed">
|
||
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="OpenSign™ Atom Feed"><link rel="stylesheet" href="/assets/css/styles.ae9c04aa.css">
|
||
<script src="/assets/js/runtime~main.87605498.js" defer="defer"></script>
|
||
<script src="/assets/js/main.336da282.js" defer="defer"></script>
|
||
</head>
|
||
<body class="navigation-with-keyboard">
|
||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const a=new URLSearchParams(window.location.search).entries();for(var[t,e]of a)if(t.startsWith("docusaurus-data-")){var n=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(n,e)}}catch(t){}}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}())</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><div class="announcementBar_mb4j" style="background-color:#cae4fa;color:#091E42" role="banner"><div class="content_knG7 announcementBarContent_xLdY">Help use spread the word - ⭐ OpenSign on <a target="_blank" rel="noopener" href="https://github.com/opensignlabs/opensign">GitHub</a></div></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo.png" alt="OpenSign™ Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/logo.png" alt="OpenSign™ Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">OpenSign™</b></a><a class="navbar__item navbar__link" href="/docs/help/intro">Help</a><a class="navbar__item navbar__link" href="/docs/API-docs/opensign-api-v-1">APIs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/contribute/CODE_OF_CONDUCT">Contribute</a><a href="https://www.opensignlabs.com/plans-pricing" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Cloud Pricing<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a class="navbar__item navbar__link" href="/docs/self-host/intro">Self-host</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/opensignlabs/opensign" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG menuWithAnnouncementBar_GW3s"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute/CODE_OF_CONDUCT">Code of conduct</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute/intro">Contributing to OpenSign</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute/COMMUNITY">Community at OpenSign™</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/contribute/INSTALLATION">INSTALLATON INSTRUCTIONS</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute/REPORTING_GUIDELINES">REPORTING_GUIDELINES</a></li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_xLCN"><div class="docItemContainer_jfFK"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">INSTALLATON INSTRUCTIONS</span><meta itemprop="position" content="1"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><div class="row"><div class="col col--12"><h1>INSTALLATON INSTRUCTIONS</h1>
|
||
<p>You can use our app as a cloud version from <a href="https://www.opensignlabs.com" target="_blank" rel="noopener noreferrer">OpenSignLabs</a></p>
|
||
<p>or follow below instructions to install it on your own infrastructure.</p>
|
||
<ul>
|
||
<li>Localhost(Frontend only)</li>
|
||
<li>Localhost(Docker)</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="localhostfrontend-only">Localhost(Frontend only)<a href="#localhostfrontend-only" class="hash-link" aria-label="Direct link to Localhost(Frontend only)" title="Direct link to Localhost(Frontend only)"></a></h2>
|
||
<p>This is the easiest way to run the frontend application for development or testing purpose without the hassle of installing backend & DB. All the features including document upload, signing, email notifications will work seamlessly from staging backend.</p>
|
||
<p><strong>Warning:</strong> All data, including user accounts and documents, is stored in the staging backend. This data will be erased every time there is a merge to the main branch. As a result, you may need to recreate user accounts repeatedly. If you find that login attempts are failing, it is likely because the data has been cleared due to a recent merge.</p>
|
||
<p>Below are the steps to follow -</p>
|
||
<ul>
|
||
<li><a href="https://help.github.com/articles/cloning-a-repository/" target="_blank" rel="noopener noreferrer">Clone the repository</a> to your local machine using below command -<!-- -->
|
||
<div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">git clone https://github.com/OpenSignLabs/OpenSign.git</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||
</li>
|
||
<li>Copy the .env.frontend_dev file to apps/OpenSign/.env using below command(on mac & linux). For windows use COPY command instead.<!-- -->
|
||
<div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">cp .env.frontend_dev apps/OpenSign/.env</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||
</li>
|
||
<li>CD to /apps/OpenSign directory</li>
|
||
<li>Install NPM packages using<!-- -->
|
||
<div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">npm install</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||
</li>
|
||
<li>Run the project locally using<!-- -->
|
||
<div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">npm run start</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||
</li>
|
||
</ul>
|
||
<p>You should be able to access the application from <a href="http://localhost:3000" target="_blank" rel="noopener noreferrer">http://localhost:3000</a> after this.
|
||
Create an account by signing-up and start contributing.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="you-will-need-to-create-an-aws-s3-bucket-or-digital-ocean-space-in-order-to-store-your-uploaded-documents">You will need to create an AWS S3 bucket or digital ocean space in order to store your uploaded documents<a href="#you-will-need-to-create-an-aws-s3-bucket-or-digital-ocean-space-in-order-to-store-your-uploaded-documents" class="hash-link" aria-label="Direct link to You will need to create an AWS S3 bucket or digital ocean space in order to store your uploaded documents" title="Direct link to You will need to create an AWS S3 bucket or digital ocean space in order to store your uploaded documents"></a></h2>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="aws-s3--">AWS S3 -<a href="#aws-s3--" class="hash-link" aria-label="Direct link to AWS S3 -" title="Direct link to AWS S3 -"></a></h3>
|
||
<ul>
|
||
<li>Step 1 : Create a S3 bucket<!-- -->
|
||
<ul>
|
||
<li>Login to AWS console</li>
|
||
<li>Navigate to S3 under services</li>
|
||
<li>Hit "Create Bucket" button on upper right corner</li>
|
||
<li>Remove the check from "block all public access" checkbox(we need this in order to provide access to not-logged in users after OTP verification)</li>
|
||
<li>Set bucket versioning and tags as per your requirements</li>
|
||
<li>Hit "Create bucket" button</li>
|
||
</ul>
|
||
</li>
|
||
<li>Step 2 : Create IAM user and provide access to AWS bucket<!-- -->
|
||
<ul>
|
||
<li>Search for "IAM" on the search bar in AWS console</li>
|
||
<li>On IAM dashboard, click the number of users(count) under IAM resources table</li>
|
||
<li>Hit "create user" button on the upper right corner of the page</li>
|
||
<li>Enter the user name & click next</li>
|
||
<li>Click create policy, search for S3 and provide the Read, Write & list permissions</li>
|
||
<li>Click next and click "Create user"</li>
|
||
</ul>
|
||
</li>
|
||
<li>Step 3 : Generate Credentials</li>
|
||
<li>Go to IAM/Users in AWS console</li>
|
||
<li>Hit the hyperlink for the user created in the previous step</li>
|
||
<li>Click the "Security credentials" tab</li>
|
||
<li>Scroll down to "Access keys" and hit "Create access key"</li>
|
||
<li>In the next step select "Application running outside AWS"</li>
|
||
<li>Add a description tag if needed & hit "Create access key"</li>
|
||
<li>In the next step you will see "Access key" and "Secret Access key". Copy both the values.</li>
|
||
<li>Set the value of "Access key" to "DO_ACCESS_KEY_ID" environment variable</li>
|
||
<li>Set the value of "Secret Access key" to "DO_SECRET_ACCESS_KEY" environment variable</li>
|
||
<li>Step 3 : Copy bucket credentials<!-- -->
|
||
<ul>
|
||
<li>Visit "Amazon S3 -> Buckets" in aws console</li>
|
||
<li>Click the bucket created in previous steps & visit the properties tab</li>
|
||
<li>Under "Bucket overview" you will find the value of AWS region(for ex. ap-south-1). Set that value to env variable "DO_REGION"</li>
|
||
<li>You can create the value for "DO_ENDPOINT" env variable by appending the region value to amazonaws.com (for ex. s3.ap-south-1.amazonaws.com)</li>
|
||
<li>You can create the value for "DO_BASEURL" by adding the bucketname in front of the endpoint value(for ex. <a href="https://bucketname.s3.ap-south-1.amazonaws.com" target="_blank" rel="noopener noreferrer">https://bucketname.s3.ap-south-1.amazonaws.com</a>)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>Visit below link if you face any issues while following the above instructions -</p>
|
||
<ul>
|
||
<li><a href="https://repost.aws/knowledge-center/create-access-key" target="_blank" rel="noopener noreferrer">https://repost.aws/knowledge-center/create-access-key</a></li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="localhostdocker">Localhost(Docker)<a href="#localhostdocker" class="hash-link" aria-label="Direct link to Localhost(Docker)" title="Direct link to Localhost(Docker)"></a></h2>
|
||
<p>For local Setup we need to need following prerequisite:</p>
|
||
<p>Environment Varaibles:</p>
|
||
<table><thead><tr><th>Environment Varibale</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td>CI</td><td>false</td><td>Set CI to false while running the app locally</td></tr><tr><td>PUBLIC_URL</td><td><a href="http://localhost:3000" target="_blank" rel="noopener noreferrer">http://localhost:3000</a></td><td>Set it to the URL form where the app home page will be accessed</td></tr><tr><td>GENERATE_SOURCEMAP</td><td>false</td><td>Set it to true if you want to generate the Sourcemap for debugging</td></tr><tr><td>REACT_APP_SERVERURL</td><td><a href="http://localhost:8080/app" target="_blank" rel="noopener noreferrer">http://localhost:8080/app</a></td><td>Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead)</td></tr><tr><td>REACT_APP_APPID</td><td>opensignstgn</td><td>A 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API.</td></tr><tr><td>APP_ID</td><td>opensignstgn</td><td>A 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.</td></tr><tr><td>appName</td><td>open_sign_server</td><td>Name of the app. It will be visible in the verification emails sent out.</td></tr><tr><td>MASTER_KEY</td><td>XnAadwKxxByMr</td><td>A 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.</td></tr><tr><td>MONGODB_URI</td><td>mongodb://host.docker.internal:27017/OpenSignDB</td><td>Mongodb URI to connect to</td></tr><tr><td>PARSE_MOUNT</td><td>/app</td><td>Path on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions.</td></tr><tr><td>SERVER_URL</td><td><a href="http://127.0.0.1:8080/app" target="_blank" rel="noopener noreferrer">http://127.0.0.1:8080/app</a></td><td>Set it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:3000/api/app (use your local port number instead)</td></tr><tr><td>DO_SPACE</td><td>DOSPACENAME</td><td>Digital ocean space name or AWS S3 bucket name for uploading documents</td></tr><tr><td>DO_ENDPOINT</td><td>ams3.digitaloceanspaces.com</td><td>Digital ocean spaces endpoint or AWS S3 endpoint for uploading documents</td></tr><tr><td>DO_BASEURL</td><td><a href="https://DOSPACENAME.ams3.digitaloceanspaces.com" target="_blank" rel="noopener noreferrer">https://DOSPACENAME.ams3.digitaloceanspaces.com</a></td><td>Digital ocean baseurl or AWS S3 base URL</td></tr><tr><td>DO_ACCESS_KEY_ID</td><td>YOUR_S3_ACCESS_ID</td><td>Digital ocean spaces access key ID or AWS s3 Access key ID for uploading the docs</td></tr><tr><td>DO_SECRET_ACCESS_KEY</td><td>YOUR_S3_ACCESS_KEY</td><td>Digital ocean spaces secret access key or AWS s3 secret access key for uploading the docs</td></tr><tr><td>DO_REGION</td><td>YOUR_S3_REGION</td><td>Digital ocean spaces region or AWS s3 region</td></tr><tr><td>USE_LOCAL</td><td>FALSE</td><td>To use local file storage to save file</td></tr><tr><td>MAILGUN_API_KEY</td><td>YOUR_MAILGUNAPI_KEY</td><td>Mailgun API Key</td></tr><tr><td>MAILGUN_DOMAIN</td><td>YOUR_MAILGUNAPI_DOMAIN</td><td>Mailgun API Domain</td></tr><tr><td>MAILGUN_SENDER</td><td>-</td><td>Mailgun Sender Mail ID</td></tr><tr><td>PFX_BASE64</td><td>-</td><td>Base64 encoded PFX or p12 document signing certificate file. You can generate base64 encoded self sign certificate using the passphrase <code>emudhra</code></td></tr></tbody></table>
|
||
<h1>Steps to Generate Self Sign Certificate</h1>
|
||
<div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain"># execute below command and use passphrase emudhra</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">openssl genrsa -des3 -out ./cert/local_dev.key 2048</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">openssl req -key ./cert/local_dev.key -new -x509 -days 365 -out ./cert/local_dev.crt</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">openssl pkcs12 -inkey ./cert/local_dev.key -in ./cert/local_dev.crt -export -out ./cert/local_dev.pfx</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">openssl base64 -in ./cert/local_dev.pfx -out ./cert/base64_pfx</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||
<h1>CORS Configuration</h1>
|
||
<p>As document storage is delegated to S3-compatible services that reside in a different host than the OpenSign one, document operations (loading, storing, deleting) are subject to <a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_blank" rel="noopener noreferrer">Cross-Origin Resource Sharing</a> restriction policies; as a consequence, OpenSign app may fail with (browser console) errors like the following:</p>
|
||
<div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">Access to fetch at 'https://foo.nyc3.digitaloceanspaces.com/exported_file_4627_0000-00-00T00%3A45%3A43.344Z.pdf'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">is present on the requested resource. If an opaque response serves your needs, set the request's mode to</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">'no-cors' to fetch the resource with CORS disabled.</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
|
||
<p>In order to address this, your document storage system must be instructed to accept requests from other hosts; below the relevant documentation links:</p>
|
||
<ul>
|
||
<li><a href="https://docs.digitalocean.com/products/spaces/how-to/configure-cors/" target="_blank" rel="noopener noreferrer">How to Configure CORS on DigitalOcean Spaces</a></li>
|
||
<li><a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/enabling-cors-examples.html" target="_blank" rel="noopener noreferrer">Configuring cross-origin resource sharing on AWS S3</a></li>
|
||
</ul>
|
||
<h1>Build Local Environment</h1>
|
||
<p>Command to build project -</p>
|
||
<ul>
|
||
<li>Execute <code>make build</code></li>
|
||
</ul>
|
||
<p>Command to run project -</p>
|
||
<ul>
|
||
<li>Execute <code>make run</code></li>
|
||
</ul></div></div></div><div class="col col--12"><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/opensignlabs/opensign/tree/feat-docs/docs/docs/contribute/INSTALLATION.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"></div></div></footer></div></article><div class="col col--12"><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/contribute/COMMUNITY"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Community at OpenSign™</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/contribute/REPORTING_GUIDELINES"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">REPORTING_GUIDELINES</div></a></nav></div></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#localhostfrontend-only" class="table-of-contents__link toc-highlight">Localhost(Frontend only)</a></li><li><a href="#you-will-need-to-create-an-aws-s3-bucket-or-digital-ocean-space-in-order-to-store-your-uploaded-documents" class="table-of-contents__link toc-highlight">You will need to create an AWS S3 bucket or digital ocean space in order to store your uploaded documents</a><ul><li><a href="#aws-s3--" class="table-of-contents__link toc-highlight">AWS S3 -</a></li></ul></li><li><a href="#localhostdocker" class="table-of-contents__link toc-highlight">Localhost(Docker)</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/help/intro">Help</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/API-docs/opensign-api-v-1">APIs</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/contribute/intro">Contribute</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/self-host/intro">Self-host</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://discord.com/invite/xe9TDuyAyj" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.linkedin.com/company/opensign%E2%84%A2/" target="_blank" rel="noopener noreferrer" class="footer__link-item">LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.twitter.com/opensignhq" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.facebook.com/profile.php?id=61551030403669" target="_blank" rel="noopener noreferrer" class="footer__link-item">Facebook<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://www.opensignlabs.com" target="_blank" rel="noopener noreferrer" class="footer__link-item">Official Website<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://github.com/opensignlabs/opensign" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 OpenSign™. <br>The best Open Source DocuSign alternative.</div></div></div></footer></div>
|
||
</body>
|
||
</html> |