https://github.com/thesurlydev/fargate
Minimal template to deploy to AWS ECS Fargate.
https://github.com/thesurlydev/fargate
aurora cloudformation fargate javaspark kotlin
Last synced: about 1 year ago
JSON representation
Minimal template to deploy to AWS ECS Fargate.
- Host: GitHub
- URL: https://github.com/thesurlydev/fargate
- Owner: thesurlydev
- Created: 2018-07-29T22:01:32.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-29T22:17:47.000Z (almost 8 years ago)
- Last Synced: 2025-02-06T18:52:29.087Z (over 1 year ago)
- Topics: aurora, cloudformation, fargate, javaspark, kotlin
- Language: Kotlin
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fargate
Minimal template for AWS Fargate.
## Prerequisite
Create a file to hold project-agnostic variables. (Sourced from `common.sh`)
```
#!/usr/bin/env bash
set -e
AWS_PROFILE=default
AWS_ACCOUNT_ID=[YOUR_AWS_ACCOUNT_ID]
AWS_REGION="us-west-2"
MY_IP=[YOUR_IP]
MY_VPC=[YOUR_VPC_ID]
MY_SUBNETS=[SUBNETS]
PROJECT_NAMESPACE=[YOUR_NAMESPACE]
```
Assumes you're deploying to existing subnets defined by `[MY_SUBNETS]` in an existing VPC defined by `[MY_VPC]`
By default the ECS service and database are locked down and allow ingress from the IP address defined by `MY_IP`
## Initial Setup
Optional: To create an Aurora cluster:
```
./create-db.sh`
```
Build and initial setup of a Fargate cluster:
```
./create-ecs-service.sh`
```
## Build
```
./gradlew clean build jibDockerBuild
```
## Deploying
To redeploy code changes:
1. update project version in `gradle.properties`
2. run `./redeploy.sh`