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
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
To destroy created EC2 and the other resources run the following command.
make destroy
make mongo-post-prod
make inmemory-post-prod
make inmemory-get-prod