Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rafalwilinski/deploy-with-serverless
Deploy Serverless Framework architectures with a single click, no terminal required
https://github.com/rafalwilinski/deploy-with-serverless
aws-batch aws-lambda nodejs serverless serverless-framework
Last synced: 2 months ago
JSON representation
Deploy Serverless Framework architectures with a single click, no terminal required
- Host: GitHub
- URL: https://github.com/rafalwilinski/deploy-with-serverless
- Owner: RafalWilinski
- Created: 2017-10-07T16:57:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-18T08:46:28.000Z (about 7 years ago)
- Last Synced: 2024-10-03T12:33:42.272Z (3 months ago)
- Topics: aws-batch, aws-lambda, nodejs, serverless, serverless-framework
- Language: JavaScript
- Homepage: https://rwilinski.me
- Size: 726 KB
- Stars: 39
- Watchers: 7
- Forks: 8
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deploy with Serverless
Infrastructure for processing Serverless projects and creating one-click deployments.
![Infra](assets/infra_v2.png?raw=true "Infrastructure Overview")
## Demo
[![](https://v26mdkczs6.execute-api.us-east-1.amazonaws.com/dev/image?url=https://github.com/RafalWilinski/serverless-medium-text-to-speech)](https://v26mdkczs6.execute-api.us-east-1.amazonaws.com/dev/template?url=http://github.com/RafalWilinski/serverless-medium-text-to-speech)*Clicking button above will start deploy procedure of [serverless-medium-text-to-speech](https://github.com/RafalWilinski/serverless-medium-text-to-speech) project on your AWS Account via CloudFormation*
### Goal
Goal of the project is to create a mechanism for 1-click deployments, similar to Deploy on Heroku or Create Stack (CloudFormation) buttons, for Serverless Framework based projects.## Adding to your own project
In `README.md`, add following button/image:
```
[![](https://kkcohgzei0.execute-api.us-east-1.amazonaws.com/dev/image?url=)](https://kkcohgzei0.execute-api.us-east-1.amazonaws.com/dev/template?url=)
```All the magic like building project, uploading artifacts or creating CloudFormation template is handled automatically!
You can add following params to URL in order to change build procedure:
- `before` - command invoked before `serverless package --stage dev`, by default it's `null`
- `package` - by default `serverless package --stage dev`
- `after` - command invoked after `serverless package --stage dev`, by default it's `null`E.g.:
```url
https://kkcohgzei0.execute-api.us-east-1.amazonaws.com/dev/image
?url=http://github.com/RafalWilinski/serverless-medium-text-to-speech
&before=npm%20run%20build
&package=serverless%20package%20--stage%20prod
&after=rm%20-fr%20node_modules
```## Development
### Prerequisites
- Node
- AWS Account, AWS CLI & credentials Set
- Serverless Framework
- Docker### Setup
```bash
git clone https://github.com/RafalWilinski/deploy-with-serverless
cd deploy-with-serverless
npm install
```### Commands
- `npm run deploy` - Deploys whole infrastructure, builds Docker image which processes projects and pushes that image to ECR
- `npm run gen-passwd` - generates a random password for user which interacts with ECS
- `npm run deploy-img` - deploys image asset to public bucket
- `npm run deploy-static` - deploys 404 page
- `npm run deploy-assets` - deploys both imgs and static pages