Giter Site home page Giter Site logo

dokku-pages's Introduction

dokku-pages

NPM Version License Downloads/week Github Issues

A simple way to deploy a static site to dokku.

Get Started

Installation

npm i -g dokku-pages

Usage

dokku-pages deploy -g [email protected]:myapp -p dist

Minimal Containers

By adding the --minimal flag, you can dramatically decrease container footprint.

Deploy Command Dokku Type Image Size
deploy ... Herokuish Build Pack 1.5 GB
deploy ... --minimal Docker Build 55 MB

That's a saving of 96.4%!

Help

Usage: dokku-pages [options] [command]

Options:
  -h, --help        display help for command

Commands:
  deploy [options]  Deploys this library to your dokku
    -g, --giturl <giturl>   The dokku git url (eg: user@host:app)
    -d, --dist <directory>  The static directory
    --minimal               Use minimal docker image instead of herokuish buildpack
    --allow-cors <domains>  Allow CORS for a domain (example.com or *)
    --dry-run               Only build the image, won't deploy to dokku
    -h, --help              display help for command

  help [command]    display help for command

CORS on certain paths

Cors configuration is only available with the flag --minimal.

CORS Example Arguments:
  --allow-cors '*'                ANY domain
  --allow-cors 'a1.com'           a1.com OR www.a2.com
  --allow-cors 'a1.com|a2.com'    a1.com OR a2.com
  --allow-cors '.+\.example.com'  ANY subdomain of example.com
  --allow-cors 'localhost:.+'     ANY port on localhost

Notes

  • This requires:
    • npm
    • git
    • ssh
  • You need to have ssh access to the dokku instance
  • The app needs to exist on the dokku instance

Inspiration

This package is inspired by the ease of use of gh-pages

dokku-pages's People

Contributors

benwinding avatar

Watchers

 avatar

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.