Open sebastian-sommerfeld-io opened 5 months ago
For your requirements, you have several cloud providers and services to choose from that allow you to host a single Docker container with minimal setup. Here's a summary of some suitable options:
AWS Fargate allows you to run containers directly without having to manage the underlying infrastructure. You can use AWS ECS (Elastic Container Service) with Fargate to run your Docker container.
Terraform Example:
provider "aws" {
region = "us-west-2"
}
resource "aws_ecs_cluster" "example" {
name = "example"
}
resource "aws_ecs_task_definition" "example" {
family = "example"
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
cpu = "256"
memory = "512"
container_definitions = jsonencode([
{
name = "example"
image = "nginx:latest"
essential = true
portMappings = [
{
containerPort = 80
hostPort = 80
protocol = "tcp"
}
]
}
])
}
resource "aws_ecs_service" "example" {
name = "example"
cluster = aws_ecs_cluster.example.id
task_definition = aws_ecs_task_definition.example.arn
desired_count = 1
network_configuration {
subnets = ["subnet-xxxxxxxx"]
security_groups = ["sg-xxxxxxxx"]
}
}
Google Cloud Run allows you to run stateless containers that are triggered by HTTP requests. It's fully managed and scales automatically.
Terraform Example:
provider "google" {
project = "my-gcp-project"
region = "us-central1"
}
resource "google_cloud_run_service" "example" {
name = "example"
location = "us-central1"
template {
spec {
containers {
image = "gcr.io/my-gcp-project/example:latest"
}
}
}
traffic {
percent = 100
latest_revision = true
}
}
Azure Container Instances allows you to run containers directly without VM management.
Terraform Example:
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West US"
}
resource "azurerm_container_group" "example" {
name = "example-containergroup"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
os_type = "Linux"
container {
name = "example-container"
image = "nginx:latest"
cpu = "0.5"
memory = "1.5"
ports {
port = 80
protocol = "TCP"
}
}
ip_address {
type = "Public"
ports {
port = 80
protocol = "TCP"
}
}
}
Each of these services meets your requirement of not needing to manage the underlying infrastructure and can be deployed using Infrastructure as Code (IaC) tools like Terraform. Choose the one that fits best with your current or preferred cloud ecosystem.
As a maintainer of the Krokidile project, I want to automate the deployment of the documentation website so that it updates on krokidile.sommerfeld.io every time a new version is released.
Acceptance Criteria
Todos
release.yml