sommerfeld-io-archive / krokidile

Web-based Live-Editor for Diagrams to use with kroki.io
https://krokidile.sommerfeld.io
Other
1 stars 0 forks source link

Upload Website via FTP to webspace from pipeline #9

Open sebastian-sommerfeld-io opened 5 months ago

sebastian-sommerfeld-io commented 5 months ago

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

sebastian-sommerfeld-io commented 5 months ago

Alternative: Cloud

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:

1. AWS Fargate (with Amazon ECS)

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"]
  }
}

2. Google Cloud Run

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
  }
}

3. Azure Container Instances (ACI)

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"
    }
  }
}

Summary

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.

sebastian-sommerfeld-io commented 5 months ago

Infrastructure as Code

sebastian-sommerfeld-io commented 5 months ago

https://youtu.be/AL2rAmWFZjM?si=RS77hF6YwuhbyVVI

https://youtu.be/nhwYc4StHIc?si=ilZX13rU02XVSHoc