s3f4 / ginterview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Case study


Usage

Clone the project

git clone https://github.com/s3f4/ginterview

In order to use locally, first go to api folder and create .env file with the following content.

MONGO_DSN=Your mongo dsn

Project can be built with the following command:

make build

or If docker is installed on the computer, the project can be build with the following command.

make up

Build infrastructure

In order to build infrastructure on aws Terraform must be installed.

  • Create aws iam with administrator permission
  • Create a terraform.tfvars file with the following content in the infra folder
    access_key = "your access key"
    secret_key = "your secret key"
    

and apply

make apply

Clean Up

To destroy created EC2 and the other resources run the following command.

make destroy

Prod request test

make mongo-post-prod
make inmemory-post-prod
make inmemory-get-prod

About


Languages

Language:Go 83.0%Language:HCL 9.0%Language:Makefile 7.0%Language:Dockerfile 0.9%