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: README.md
+14-11
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
Expose an app/api running on local host to public internet using AWS EC2
3
3
4
4
### Requirements
5
-
- Access to an AWS account.
5
+
- Access to an AWS account and [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions) configured.
6
6
- A `service/app/api` running on a specific port that has to be exposed to public internet.
7
7
-**[Optional]** A domain `example.com` hosted on `route53`.
8
8
@@ -14,14 +14,17 @@ Environment variables can be loaded from a `.env` file.
14
14
-`PORT`: Port number that has to be exposed (on which a localhost `service/app/api` is running)
15
15
16
16
**Optional Args:**
17
-
-`AMI_ID`: ID of any public AMI with an Ubuntu OS. Defaults to a region specific image ID.
18
-
-`ACCESS_KEY`: Access key to access AWS resources. Defaults to `~/.aws/config`
19
-
-`SECRET_KEY`: Secret key to access AWS resources. Defaults to `~/.aws/config`
20
-
-`REGION_NAME`: Region name where the instance should live. Defaults to `US-WEST-2`
21
-
-`DOMAIN`: If the domain name is registered using `route53`. *Example: `mywebsite.com`*
22
-
-`SUBDOMAIN`: Sub-domain that has to be added for the domain name. *Example: `tunnel.mywebsite.com`*
23
-
-`EMAIL`: Email address to create the self-signed SSL and private key. Defaults to `[email protected]`
24
-
-`ORG`: Organization name for the certificate. Defaults to the AWS endpoint.
17
+
-`IMAGE_ID`: ID of any public AMI with an Ubuntu OS. Defaults to a region specific image ID.
18
+
-`AWS_ACCESS_KEY`: Access key to access AWS resources. Defaults to `~/.aws/config`
19
+
-`AWS_SECRET_KEY`: Secret key to access AWS resources. Defaults to `~/.aws/config`
20
+
-`AWS_REGION_NAME`: Region name where the instance should live. Defaults to `US-WEST-2`
21
+
22
+
*Optionally `.env` files can also be scanned for:*
23
+
```python
24
+
import expose
25
+
26
+
expose.load_env(scan=True)
27
+
```
25
28
26
29
<details>
27
30
<summary><strong>Setup a custom endpoint</strong></summary>
@@ -58,8 +61,8 @@ To manually generate a self-signed cert:
58
61
59
62
Simply let `expose` create a self-signed SSL certificate and a private key.
60
63
61
-
-`EMAIL`: Email address to create the self-signed SSL and private key. Defaults to `[email protected]`
62
-
-`ORG`: Organization name for the certificate. Defaults to the AWS endpoint.
64
+
-`EMAIL_ADDRESS`: Email address to create the self-signed SSL and private key. Defaults to `[email protected]`
65
+
-`ORGANIZATION`: Organization name for the certificate. Defaults to the AWS endpoint.
Copy file name to clipboardexpand all lines: docs/README.html
+13-11
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ <h1>Expose localhost using EC2<a class="headerlink" href="#expose-localhost-usin
48
48
<sectionid="requirements">
49
49
<h2>Requirements<aclass="headerlink" href="#requirements" title="Permalink to this heading">¶</a></h2>
50
50
<ulclass="simple">
51
-
<li><p>Access to an AWS account.</p></li>
51
+
<li><p>Access to an AWS account and <aclass="reference external" href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions">AWS CLI</a> configured.</p></li>
52
52
<li><p>A <codeclass="docutils literal notranslate"><spanclass="pre">service/app/api</span></code> running on a specific port that has to be exposed to public internet.</p></li>
53
53
<li><p><strong>[Optional]</strong> A domain <codeclass="docutils literal notranslate"><spanclass="pre">example.com</span></code> hosted on <codeclass="docutils literal notranslate"><spanclass="pre">route53</span></code>.</p></li>
54
54
</ul>
@@ -64,15 +64,17 @@ <h3>Environment Variables:<a class="headerlink" href="#environment-variables" ti
64
64
</ul>
65
65
<p><strong>Optional Args:</strong></p>
66
66
<ulclass="simple">
67
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">AMI_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">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">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">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>
71
-
<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>
72
-
<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>
73
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">EMAIL</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>
74
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ORG</span></code>: Organization name for the certificate. Defaults to the AWS endpoint.</p></li>
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>
75
71
</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>
78
80
<p>:warning: Requires an active hosted zone on <codeclass="docutils literal notranslate"><spanclass="pre">route53</span></code>.</p>
@@ -100,8 +102,8 @@ <h3>Certificate:<a class="headerlink" href="#certificate" title="Permalink to th
100
102
<p>[OR]</p>
101
103
<p>Simply let <codeclass="docutils literal notranslate"><spanclass="pre">expose</span></code> create a self-signed SSL certificate and a private key.</p>
102
104
<ulclass="simple">
103
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">EMAIL</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>
104
-
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ORG</span></code>: Organization name for the certificate. Defaults to the AWS endpoint.</p></li>
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>
Copy file name to clipboardexpand all lines: docs/_sources/README.md.txt
+14-11
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
Expose an app/api running on local host to public internet using AWS EC2
3
3
4
4
### Requirements
5
-
- Access to an AWS account.
5
+
- Access to an AWS account and [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions) configured.
6
6
- A `service/app/api` running on a specific port that has to be exposed to public internet.
7
7
- **[Optional]** A domain `example.com` hosted on `route53`.
8
8
@@ -14,14 +14,17 @@ Environment variables can be loaded from a `.env` file.
14
14
- `PORT`: Port number that has to be exposed (on which a localhost `service/app/api` is running)
15
15
16
16
**Optional Args:**
17
-
- `AMI_ID`: ID of any public AMI with an Ubuntu OS. Defaults to a region specific image ID.
18
-
- `ACCESS_KEY`: Access key to access AWS resources. Defaults to `~/.aws/config`
19
-
- `SECRET_KEY`: Secret key to access AWS resources. Defaults to `~/.aws/config`
20
-
- `REGION_NAME`: Region name where the instance should live. Defaults to `US-WEST-2`
21
-
- `DOMAIN`: If the domain name is registered using `route53`. *Example: `mywebsite.com`*
22
-
- `SUBDOMAIN`: Sub-domain that has to be added for the domain name. *Example: `tunnel.mywebsite.com`*
23
-
- `EMAIL`: Email address to create the self-signed SSL and private key. Defaults to `[email protected]`
24
-
- `ORG`: Organization name for the certificate. Defaults to the AWS endpoint.
17
+
- `IMAGE_ID`: ID of any public AMI with an Ubuntu OS. Defaults to a region specific image ID.
18
+
- `AWS_ACCESS_KEY`: Access key to access AWS resources. Defaults to `~/.aws/config`
19
+
- `AWS_SECRET_KEY`: Secret key to access AWS resources. Defaults to `~/.aws/config`
20
+
- `AWS_REGION_NAME`: Region name where the instance should live. Defaults to `US-WEST-2`
21
+
22
+
*Optionally `.env` files can also be scanned for:*
23
+
```python
24
+
import expose
25
+
26
+
expose.load_env(scan=True)
27
+
```
25
28
26
29
<details>
27
30
<summary><strong>Setup a custom endpoint</strong></summary>
@@ -58,8 +61,8 @@ To manually generate a self-signed cert:
58
61
59
62
Simply let `expose` create a self-signed SSL certificate and a private key.
60
63
61
-
- `EMAIL`: Email address to create the self-signed SSL and private key. Defaults to `[email protected]`
62
-
- `ORG`: Organization name for the certificate. Defaults to the AWS endpoint.
64
+
- `EMAIL_ADDRESS`: Email address to create the self-signed SSL and private key. Defaults to `[email protected]`
65
+
- `ORGANIZATION`: Organization name for the certificate. Defaults to the AWS endpoint.
0 commit comments