You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Trust-Wallet-Gateway Application Deployment on AWS ECS Fargate with GitHub Actions
2
+
3
+
This repository contains the necessary codebase and deployment artifacts for deploying a trust-wallet-gateway service on AWS ECS FARgate.
4
+
5
+
## Architecture
6
+
7
+
The architecture includes the use of GitHub for source code management and GitHub Actions for Continuous Integration and Continuous Deployment (CI/CD). The CI/CD pipeline lints, tests, builds, and deploys the Go service to a Kubernetes cluster in AWS ECS.
8
+
9
+
Here is a high-level view of the architecture:
10
+
```
11
+
[GitHub] --- [GitHub Actions] --- [Docker Hub]
12
+
\ /
13
+
-- [AWS ECS Fargate (Kubernetes)] --
14
+
```
15
+
16
+
17
+
## Prerequisites
18
+
19
+
- Go 1.16+
20
+
- Docker
21
+
- AWS
22
+
- terraform
23
+
24
+
## Deployment Steps
25
+
26
+
1. Clone this repository and navigate to the project directory.
27
+
2. Run `make install-dependencies` to install required dependencies.
28
+
3. Set the required environment variables in your local environment and GitHub secrets for GitHub Actions.
29
+
4. Push your changes to the `main` branch.
30
+
5. GitHub Actions will automatically lint, test, build the Docker image, push the image to Docker Hub, and deploy the service to the AWS Fargate.
31
+
32
+
33
+
## Builld and Deployment Configuration
34
+
35
+
The Makefile includes the commands to lint, test, build the Docker image, and push the image to Docker Hub.
36
+
37
+
```shell
38
+
make lint # Run lint
39
+
make test# Run tests
40
+
make docker-build # Build Docker image
41
+
make docker-push # Push Docker image
42
+
make install-dependencies # Install dependencies
43
+
make deploy # Deploy to AWS ECS Fargate
44
+
```
45
+
46
+
## Continuous Integration and Deployment
47
+
48
+
This project uses GitHub Actions for CI/CD. When changes are pushed to the `main` branch, the following steps are executed:
49
+
50
+
1. Linting and testing of the Go code.
51
+
2. Building of the Docker image.
52
+
3. Pushing of the Docker image to Docker Hub.
53
+
4. Deployment of the Docker image to the Kubernetes cluster in the AWS EKS environment.
54
+
5. Setting up the AWS ECS Fargate cluster and deploying the service.
55
+
6. The service is accessible via the public IP address of the AWS ECS Fargate cluster.
56
+
7. The GitHub Actions workflow is defined in the `.github/workflows/deploy.yml` file and its used to autoae the deployment of the service to AWS ECS Fargate.
0 commit comments