You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/README.html
+34-27
Original file line number
Diff line number
Diff line change
@@ -60,50 +60,46 @@ <h3>Environment Variables:<a class="headerlink" href="#environment-variables" ti
60
60
<p>Environment variables can be loaded from a <codeclass="docutils literal notranslate"><spanclass="pre">.env</span></code> file.</p>
61
61
<p><strong>Mandatory Arg:</strong></p>
62
62
<ulclass="simple">
63
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">PORT</span></code>: Port number that has to be exposed (on which a localhost <codeclass="docutils literal notranslate"><spanclass="pre">service/app/api</span></code> is running)</p></li>
63
+
<li><p><strong>PORT</strong>: Port number that has to be exposed (on which a localhost <codeclass="docutils literal notranslate"><spanclass="pre">service/app/api</span></code> is running)</p></li>
64
64
</ul>
65
65
<p><strong>Optional Args:</strong></p>
66
66
<ulclass="simple">
67
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">IMAGE_ID</span></code>: ID of any public AMI with an Ubuntu OS. Defaults to a region specific image ID.</p></li>
68
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">AWS_ACCESS_KEY</span></code>: Access key to access AWS resources. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">~/.aws/config</span></code></p></li>
69
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">AWS_SECRET_KEY</span></code>: Secret key to access AWS resources. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">~/.aws/config</span></code></p></li>
70
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">AWS_REGION_NAME</span></code>: Region name where the instance should live. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">US-WEST-2</span></code></p></li>
67
+
<li><p><strong>IMAGE_ID</strong>: ID of any public AMI with an Ubuntu OS. Defaults to a region specific image ID.</p></li>
68
+
<li><p><strong>AWS_ACCESS_KEY</strong>: Access key to access AWS resources. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">~/.aws/config</span></code></p></li>
69
+
<li><p><strong>AWS_SECRET_KEY</strong>: Secret key to access AWS resources. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">~/.aws/config</span></code></p></li>
70
+
<li><p><strong>AWS_REGION_NAME</strong>: Region name where the instance should live. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">US-WEST-2</span></code></p></li>
71
+
<li><p><strong>KEY_PAIR</strong>: Name for the ec2 key pair file. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">expose_localhost</span></code></p></li>
72
+
<li><p><strong>SECURITY_GROUP</strong>: Name for the security group to allow port access. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">Expose</span><spanclass="pre">Localhost</span></code></p></li>
73
+
<li><p><strong>SERVER_INFO</strong>: Name for the JSON file to store the configuration info. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">server_info.json</span></code></p></li>
71
74
</ul>
72
-
<p><em>Optionally <codeclass="docutils literal notranslate"><spanclass="pre">.env</span></code> files can also be scanned for:</em></p>
<summary><strong>Setup a custom endpoint</strong></summary><p>The public DNS names for EC2 instances are long and messy. To avoid that, an <codeclass="docutils literal notranslate"><spanclass="pre">A</span></code> record can be added to the <codeclass="docutils literal notranslate"><spanclass="pre">route53</span></code> hosted zone.</p>
80
77
<p>:warning: Requires an active hosted zone on <codeclass="docutils literal notranslate"><spanclass="pre">route53</span></code>.</p>
81
78
<ulclass="simple">
82
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">DOMAIN</span></code>: If the domain name is registered using <codeclass="docutils literal notranslate"><spanclass="pre">route53</span></code>. <em>Example: <codeclass="docutils literal notranslate"><spanclass="pre">mywebsite.com</span></code></em></p></li>
83
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">SUBDOMAIN</span></code>: Sub-domain that has to be added for the domain name. <em>Example: <codeclass="docutils literal notranslate"><spanclass="pre">tunnel.mywebsite.com</span></code></em></p></li>
79
+
<li><p><strong>DOMAIN</strong>: Domain name registered using <codeclass="docutils literal notranslate"><spanclass="pre">route53</span></code>. <em>Example: <codeclass="docutils literal notranslate"><spanclass="pre">mywebsite.com</span></code></em></p></li>
80
+
<li><p><strong>SUBDOMAIN</strong>: Sub-domain that has to be added for the domain name. <em>Example: <codeclass="docutils literal notranslate"><spanclass="pre">tunnel</span></code></em></p></li>
84
81
</ul>
85
-
<p> :bulb: This will be the endpoint to access the localhost.</p>
82
+
<p> :bulb: <codeclass="docutils literal notranslate"><spanclass="pre">tunnel.mywebsite.com</span></code>will be the endpoint to access the localhost from public internet.</p>
86
83
</details></section>
87
84
<sectionid="certificate">
88
85
<h3>Certificate:<aclass="headerlink" href="#certificate" title="Permalink to this heading">¶</a></h3>
89
86
<ulclass="simple">
90
87
<li><p>Securing the tunnel requires the certificate chain and the key file.</p></li>
91
-
<li><p>These two files should be saved as <codeclass="docutils literal notranslate"><spanclass="pre">cert.pem</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">key.pem</span></code>in either <codeclass="docutils literal notranslate"><spanclass="pre">~.ssh/*.pem</span></code>or within <codeclass="docutils literal notranslate"><spanclass="pre">expose</span></code>repository.</p></li>
92
-
<li><p>No certs? No problem. <aclass="reference external" href="https://github.com/thevickypedia/expose/blob/main/expose/helpers/cert.py"><codeclass="docutils literal notranslate"><spanclass="pre">expose</span></code></a> will
93
-
generate a self-signed certificate and a private key automatically.</p></li>
88
+
<li><p>The certificate and key files should be in <codeclass="docutils literal notranslate"><spanclass="pre">pem</span></code>format stored within <codeclass="docutils literal notranslate"><spanclass="pre">expose</span></code>directory.</p></li>
89
+
<li><p>File names should be stored as <codeclass="docutils literal notranslate"><spanclass="pre">key_file</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">cert_file</span></code> env var.</p></li>
90
+
<li><p>No certs? No problem. <codeclass="docutils literal notranslate"><spanclass="pre">expose</span></code> will generate a self-signed certificate and a private key automatically.</p></li>
94
91
</ul>
95
92
<details>
96
-
<summary><strong>Generate private SSL certificate</strong></summary><p>Unfortunately not many SSL certificate providers give the liberty to download key files. But <codeclass="docutils literal notranslate"><spanclass="pre">expose</span></code>, can use private certificates.</p>
97
-
<p>:warning: Some web browsers might throw a warning and some might even block a self-signed certificate/private CA.</p>
93
+
<summary><strong>Generate self-signed SSL certificate</strong></summary><p>:warning: Some web browsers might throw a warning and some might even block a self-signed certificate/private CA.</p>
<p>Simply let <codeclass="docutils literal notranslate"><spanclass="pre">expose</span></code> create a self-signed SSL certificate and a private key.</p>
104
100
<ulclass="simple">
105
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">EMAIL_ADDRESS</span></code>: Email address to create the self-signed SSL and private key. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">USER@expose-localhost.com</span></code></p></li>
106
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ORGANIZATION</span></code>: Organization name for the certificate. Defaults to the AWS endpoint.</p></li>
101
+
<li><p><strong>EMAIL_ADDRESS</strong>: Email address to create the self-signed SSL and private key. Defaults to <codeclass="docutils literal notranslate"><spanclass="pre">USER@expose-localhost.com</span></code></p></li>
102
+
<li><p><strong>ORGANIZATION</strong>: Organization name for the certificate. Defaults to the AWS endpoint.</p></li>
107
103
</ul>
108
104
</details></section>
109
105
</section>
@@ -117,13 +113,24 @@ <h3>Installation<a class="headerlink" href="#installation" title="Permalink to t
117
113
</section>
118
114
<sectionid="tunneling">
119
115
<h3>Tunneling:<aclass="headerlink" href="#tunneling" title="Permalink to this heading">¶</a></h3>
<spanclass="n">os</span><spanclass="o">.</span><spanclass="n">environ</span><spanclass="p">[</span><spanclass="s1">'env_file'</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="s1">'custom'</span><spanclass="c1"># to load a custom .env file</span>
<h2><aclass="reference external" href="https://github.com/thevickypedia/expose/blob/main/release_notes.rst">Release Notes</a><aclass="headerlink" href="#release-notes" title="Permalink to this heading">¶</a></h2>
<h2>Linting<aclass="headerlink" href="#linting" title="Permalink to this heading">¶</a></h2>
157
164
<p><codeclass="docutils literal notranslate"><spanclass="pre">PreCommit</span></code> will ensure linting, and the doc creation are run on every commit.</p>
0 commit comments