Skip to content

valiantlynx/svelte-altlokalt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

preequisite

ansible is only able to run on linux an S3 bucket with the correct name(same as in terraform/provider.tf in s3.bucket )

Developing

start a development server:

yarn dev

# or start the server and open the app in a new browser tab
yarn dev -- --open

Building

To create a production version of your app:

yarn build

or if you have docker installed

docker-compose -f docker-compose.dev.yml up -d --build

You can preview the production build with yarn preview. or if you used docker go to http://localhost:3000

To deploy your app, you may need to install an adapter for your target environment.

deploy-nodeapp-terraform-ansible

Steps to deploy

Configure AWS

Replace this credentials in main.tf

provider "aws" {
  region     = "AWS_REGION"
  access_key = "AWS_ACCESS_KEY"
  secret_key = "AWS_SECRET_KEY"
}

Command to execute

terraform

terraform init
terraform validate
terraform plan
terraform apply --auto-approve

Destroy all resouces

terraform destroy --auto-approve

ansible

ansible-playbook -i 13.60.38.190, -e "ansible_user=ubuntu ansible_ssh_private_key_file=modules/pk/terraform-key.pem" ../ansible/deploy-app.yml
ansible-playbook -i modules/ec2/dynamic_inventory.ini ../ansible/deploy-app.yml

https://www.youtube.com/watch?v=alAZl5udvAI