Amazon LightSail is an attractive option for launching LogPaste to production for two main reasons:
- You can deploy entirely from Amazon's AWS dashboard, so you don't need to install any software.
- You can view LogPaste's server logs directly from your AWS dashboard.
- LightSail offers free TLS certificates for a custom domain.
The downside is that it doesn't fit within AWS's free tier, so hosting will cost $7 per month, as of this writing.
You'll need:
- An Amazon AWS account
- A storage bucket and IAM credentials on Amazon S3 or an S3-compatible storage service.
Visit Amazon LightSail's container management dashboard
Choose a Nano server with 1x scale.
Click "Set up deployment" and then choose "Specify a custom deployment."
Enter the following information for your custom deployment:
- Container name: Choose whatever name you want, such as
yourcompany-logpaste
- Image:
mtlynch/logpaste:0.2.5
(or whatever the latest LogPaste version is) - Launch command: leave blank
- Environment variables
Key | Value |
---|---|
PORT |
3001 |
LP_BEHIND_PROXY |
"y" |
DB_REPLICA_URL |
The S3 URL of your S3 bucket |
LITESTREAM_REGION |
The region of your S3 bucket |
LITESTREAM_ACCESS_KEY_ID |
The AWS access key ID from your IAM credentials |
LITESTREAM_SECRET_ACCESS_KEY |
The AWS secret access key from your IAM credentials |
- Open ports: Choose port
3001
, protocolHTTP
Under "Public Endpoint," select the container you created above:
Choose a name for your service (it can be the same as your container name):
Finally, click "Create container service."
As LightSail deploys your image, you'll see a status of "Pending" for the container.
It will take LightSail about three to five minutes to deploy your instance for the first time. When deployment is complete, it will show a status of "Running."
When your container is running, you can access it through the "Public domain" URL.
You can view server logs for your LogPaste instance by clicking "Open log" in the box next to your container.