Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Coding

Tim Condon 0xTim

:octocat:
Coding
View GitHub Profile
@0xTim
0xTim / deploy.yaml
Created Feb 17, 2021
CF stack for a Vapor app
View deploy.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: CloudFormation stack for a Vapor app
Parameters:
TaskDefinition:
Type: String
ServiceNameBase:
Type: String
# update with the name of the service
Default: your-servoce
Certificate:
@0xTim
0xTim / deploy.swift
Last active Jan 20, 2021
A Swift script to deploy an app (in this case Vapor) to AWS Fargate from scratch. It first checks to see if there's a repository in ECR for the app, if not it creates one, builds the container and pushes it. It then checks for a registered task definition. In one doesn't exist in ECS, it updates the provided task definition with the latest ECR i…
View deploy.swift
#!/usr/bin/swift
import Foundation
// MARK: - Script variables
let awsProfileName: String? = "myProfile"
let serviceName = "someService"
// MARK: - Functions
@discardableResult
func shell(_ args: String..., returnStdOut: Bool = false, stdIn: Pipe? = nil) -> (Int32, Pipe) {
@0xTim
0xTim / Notes.md
Last active Feb 13, 2019
Changes for the Ray Wenderlich Vapor Videos for Vapor 3 RC 2
View Notes.md

Vapor 3 RC 2 Updates

Vapor 3 RC 2 is out! To update, ensure that your Package.swift contains something like:

.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0-rc"),
.package(url: "https://github.com/vapor/fluent-mysql.git", from: "3.0.0-rc"),
.package(url: "https://github.com/vapor/leaf.git", from: "3.0.0-rc"),