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: .github/workflows/README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ A t2.micro or larger will work fine, this pattern can be used to host multiple a
30
30
### Configure Instance
31
31
Under `IAM role`, use the `ecsInstanceRole`, if this is not available, see [AWS documentation for the process of checking if it exists and creating it if needed](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html).
32
32
33
+
If you are not using your own generated Elastic IP, select `Enabled` for `Auto-assign Public IP`.
34
+
33
35
You will also want to add the following Userdata script (in the `Configure` step of the launch wizard) with your own `ECS_CLUSTER` value. This tells the ecs-agent running on the instance which ECS cluster the instance should join.
34
36
35
37
```bash
@@ -52,15 +54,30 @@ You'll want to expose at least ports 80 and 443.
52
54
53
55
### Setup Docker-compose and nginx-proxy
54
56
To let your server handle multiple ServiceStack applications and automate the generation and management of TLS certificates, an additional docker-compose file is provided via the `x mix` template, `nginx-proxy-compose.yml`. This docker-compose file is ready to run and can be copied to the deployment server.
55
-
> This is done via docker-compose rather than via ECS for simplicity.
57
+
> This is done via docker-compose rather than via ECS itself for simplicity.
To copy you can use scp or just creating a new file via server text editor to copy the short YML file over. For this example, we are going to copy it straight to the ~/ (home) directory.
68
+
69
+
```bash
70
+
scp -i <path to private ssh key> ./nginx-proxy-compose.yml ec2-user@<server_floating_ip>:~/nginx-proxy.compose.yml
71
+
```
56
72
57
73
For example, once copied to remote `~/nginx-proxy-compose.yml`, the following command can be run on the remote server.
58
74
59
75
```
60
76
docker-compose -f ~/nginx-proxy-compose.yml up -d
61
77
```
62
78
63
-
This will run an nginx reverse proxy along with a companion container that will watch for additional containers in the same docker network and attempt to initialize them with valid TLS certificates.
79
+
This will run an nginx reverse proxy along with a companion container that will watch for additional containers in the same docker network and attempt to initialize them with valid TLS certificates. This includes containers created and managed by the ECS agent.
80
+
> If the container doesn't have the environment variable `VIRTUAL_HOST` set, it will be ignored.
64
81
65
82
## GitHub Repository setup
66
83
The `release.yml` assumes 6 secrets have been setup.
@@ -69,7 +86,7 @@ The `release.yml` assumes 6 secrets have been setup.
69
86
- AWS_SECRET_ACCESS_KEY - AWS access secrets for programmatic access to AWS APIs.
70
87
- AWS_REGION - default region for AWS API calls.
71
88
- AWS_ECS_CLUSTER - Cluster name in ECS, this should match the value in your Userdata.
72
-
- HOST_DOMAIN - Domain/submain of your application, eg `imgur.example.com` .
89
+
- HOST_DOMAIN - Domain/sub-domain of your application, eg `imgur.example.com` .
0 commit comments