Skip to content

Latest commit

 

History

History
70 lines (56 loc) · 2.02 KB

README.md

File metadata and controls

70 lines (56 loc) · 2.02 KB

    Vue - Vite Skeleton

Vue/Vite Skeleton


This repository is a Typescript & Javascript skeleton with Vue, designed for quickly getting started developing a web application. Check the Getting Started for full details.

Technologies

Getting Started

Docker-Compose

I have created two services for docker-compose. First one, named local, will generate docker image from current repo's state.

docker-compose up local

The second one will pull from Artifact Registry the Docker's Image

docker-compose up pro

Cloud Storage Bucket with TF-STATE

In order to keep tf-state remote using GCP, we need to create an Bucket where we will save tfstate

gsutil mb gs://${PROJECT_ID}-tfstate
gsutil versioning set on gs://${PROJECT_ID}-tfstate

The we initialize backend using this bucket

  backend "gcs" {
    bucket = "${PROJECT_ID}-tfstate"
    prefix = "state"
  }

Terraform

Commands to genereate the solution via Terraform:

terraform init
terraform plan
terraform apply

If you want to deploy K8S resources via Teraform, you should replace ci/cloud-build.yaml to lines with #. POD will be failing until you generate first version of Docker Image

Deploy Web

Each time you generate and push a new tag, CloudBuild will creates a new docker image with that tag and replace it on YAML's POD resource.

Notice that you should approve it before CloudBuild starts (it could be setted to false in 030_cloid_service_trigger tf file)