Coder Social home page Coder Social logo

taphill / deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from architect/deploy

0.0 1.0 0.0 1.01 MB

Deployment module for shipping @architect projects to the cloud

Home Page: https://arc.codes

License: Apache License 2.0

JavaScript 99.90% Arc 0.10%

deploy's Introduction

Architect serverless framework module for deploying applications to cloud infrastructure

GitHub CI status

Installation

npm i @architect/deploy
let deploy = require('@architect/deploy')

Requirements

You need to have the sam command-line utility available on your $PATH. Check out AWS' docs for instructions on how to install this.

API

deploy.direct({ isDryRun, srcDirs }, callback)

Deploys function code directly to one or more staging (or production) environment Lambdas by ommitting CloudFormation and directly updating code payloads. This is very useful for live debugging; changes made with direct deploys should be considered temporary.

deploy.sam({ verbose, production }, callback)

Deploys all infrastructure associated to your @architect app.

Set verbose to truthy to enable chatty mode. By default will only push to the staging environment unless production is truthy.

deploy.static({ bucket, credentials, fingerprint, prefix, prune, region, verbose, production }, callback)

All parameters are optional.

Pushes static assets from the public/ folder of @architect apps to S3, as defined by your @architect app's .arc file. Respects fingerprint (true or external), prefix, prune, and ignore params or @static pragma directives (more information available on the @static arc guide).

By default will only publish to the staging environment unless production is truthy. Set verbose to truthy to enable chatty mode.

aws-sdk caveat

Deploy requires aws-sdk; earlier versions included aws-sdk in peerDependencies, which prior to npm 7 would not automatically install aws-sdk. This is because Architect assumes you already have aws-sdk installed via Architect, or that it's available at runtime if you're using Deploy in a Lambda.

However, npm 7 (once again) changed the behavior of peerDependencies, now automatically installing all peerDependencies (instead of merely printing a reminder). This means any Lambdas that use Deploy would get a >50MB dependency payload if deployed on a machine with npm 7.

As such, please ensure aws-sdk is installed to your project or globally to your machine. We are sorry to make this a userland issue, but we feel this is preferable to unnecessarily and invisibly causing aws-sdk to be double-installed in Lambdas, negatively impacting coldstart times and adding to bug vectors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.