8000 GitHub - DHEPLab/augmed-infra
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DHEPLab/augmed-infra

Repository files navigation

AugMed-infra

Install hook locally

1. Install with brew

brew install pre-commit tflint tfsec trivy checkov detect-secrets

2. Install the git hook scripts

Go to root direcotry of project

pre-commit install
  • now pre-commit will run automatically on git commit!

3. (Optional) Run against all the files

It's usually a good idea to run the hooks against all the files when adding new hooks (usually pre-commit will only run on the changed files during git hooks)

pre-commit run -a

Provision infrastructure

Introduction

This project is about to deploy below services on AWS via terraform:

  • A backend server on ECS
  • A frontend server on ECS
  • A RDS database and its replica
  • AN ALB to publish api and web app

The environment folder is the main module for different env where maintain the corresponding variables.

Provision from local

  1. Config your own AWS account
    export AWS_ACCESS_KEY_ID={your_access_key}
    export AWS_SECRET_ACCESS_KEY={your_secret_key}
  2. Go into the env folder(ie: src/environments/dev)
  3. Run terraform commands
    terraform init
    terraform validate
    terraform plan
    terraform apply

Provision automatically

A Github workflow will be triggered after push codes to master branch, and its step:

  1. Check secrets
  2. Code scan, including: lint, vulnerability scan
  3. Terraform format&validate
  4. Apply to aws (Only if head commit message contains [!go deploy!])

Please notice:

  1. The AWS account is configured in Github secret, you need to change to your own one
  2. You don't have to follow these Github actions, and design your prefer.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

0