1.0.1 • Published 2 years ago

quinntainer v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Overview

npm.io npm.io

This repo contains an action for deploying containers to AWS. It will build a docker image from a Dockerfile in the repo, push the image to Amazon ECR and the run the container via AWS AppRunner.

The repo also contains a CLI tool to setup the GitHub workflow in your repo and also setup the AWS IAM role necessary for GitHub Actions to assume via OpenID Connect.

npm.io

Quickstart

To setup your application for quinntainers, run the following from within your application directory.

npx quinntainer init

Why?

This tool was inspired by a tweet from Corey Quinn following his experiences with Google Cloud Run. He's right - for his use case, Google Cloud Run is much easier. Therefore, the only appropriate solution is to create the 18th way to run containers on AWS 🚀

npm.io

Example Workflow

name: Deploy
on:
  push:
    branches: 
    - main

permissions:
  id-token: write
  contents: read

jobs:
  deploy:
    concurrency: deploy
    runs-on: ubuntu-latest
    steps:
    - uses: nektos/quinntainer@v1
      with: 
        aws-region: us-west-2
        role-to-assume: arn:aws:iam::0123456789:role/quinntainer-gha-myorg-myrepo
        port: 80

Action Inputs

The actions supports the following inputs:

InputDescription
aws-regionAWS Region, e.g. us-east-2
role-to-assumeARN of IAM Role to assume via GHA OIDC
portPort listening in container
cpuCPU to allocate to container (Default: 1024)
memoryMemory to allocate to container (Default: 2048)
docker-build-contextPath to docker build context (Default: .)
dockerfilePath to Dockerfile (Default: Dockerfile)