-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Docs for AWS * Disable shellcheck for windows * Add lightsail deployment (TODO) * fmt * Fix shellcheck * Shellcheck fix * bump * Go 1.18 * Bump
- Loading branch information
Showing
8 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# AWS Lightsail | ||
|
||
{% | ||
include "../../../terraform/aws_lightsail/README.md" | ||
start="# AWS Lightsail deployment" | ||
%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# AWS Lightsail deployment | ||
|
||
## Requirements | ||
|
||
- AWS account | ||
- `terraform` (1.0+) installed | ||
|
||
## Deploy | ||
|
||
To deploy: | ||
|
||
```sh | ||
terraform init | ||
terraform plan | ||
terraform apply | ||
``` | ||
|
||
## Destroy | ||
|
||
To destroy: | ||
|
||
```sh | ||
terraform destroy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
resource "awslightsail_container_service" "service" { | ||
name = "${var.app}-service" | ||
power = var.power | ||
scale = var.scale | ||
} | ||
|
||
resource "awslightsail_container_deployment" "deployment" { | ||
container_service_name = awslightsail_container_service.service.id | ||
container { | ||
container_name = "${var.app}-deployment" | ||
image = var.image | ||
|
||
environment { | ||
key = "ENABLE_PRIMITIVE" | ||
value = "false" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
terraform { | ||
required_providers { | ||
awslightsail = { | ||
source = "DeYoungTech/awslightsail" | ||
version = "0.7.0" | ||
} | ||
} | ||
required_version = "~> 1.0" | ||
} | ||
|
||
provider "awslightsail" { | ||
region = var.region_name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
scale = 1 | ||
power = "medium" | ||
region_name = "eu-central-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
variable "app" { | ||
type = string | ||
default = "db1000n" | ||
} | ||
|
||
variable "image" { | ||
type = string | ||
default = "ghcr.io/arriven/db1000n:latest" | ||
} | ||
|
||
variable "scale" { | ||
type = number | ||
default = 1 | ||
} | ||
|
||
# https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-creating-container-services#create-container-service-capacity | ||
variable "power" { | ||
type = string | ||
default = "medium" | ||
} | ||
|
||
variable "region_name" { | ||
type = string | ||
default = "eu-central-1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters