Skip to content

agustinanisaf/SquareCheck-infrastucture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprint 5 WPPL - Infrastructure (Aplikasi absensi online --> Square Check)

How To Use Terraform

Provision your server on digital ocean

The first thing to do is to fill up the variables needed by terraform

$ cd terraform
$ cp terraform.tfvars.example terraform.tfvars
$ nano terraform.tfvars

In terraform.tfvars there will be guide on how to get the value for your account

After filling up the variables, you can now run terraform commands

$ terraform init
$ terraform plan
$ terraform apply

To delete your server you can use the below command to do so.

$ terraform destroy

How to Use Ansible

Before going with the process, please check your inventory file and group_vars/all file

On the group_vars/all there are some additional env variables that need to be filled

Then, copy your .env for backend to roles/web/files/.env or you could fill up with the .env.example

$ cp roles/web/files/.env.example roles/web/files/.env
$ nano .env

Install Ansible Playbook Dependencies

$ ansible-galaxy collection install ansible.posix
$ ansible-galaxy collection install amazon.aws

Lastly, run the ansible command to configure your server

$ cd ansible
$ ansible-playbook -i inventory square_check_all.yml

How to Use Docker-Compose

For testing on local test command to run docker-compose are below
use -f flag because docker-compose file are not default

$ cd docker
$ docker-compose -f docker-compose.prod.yml up -d

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published