Develop & Build GatsbyJS static sites within a Docker container. Server static website content with Nginx Alpine Docker container.
- 🚮 Clutter-free host machine: No need to install Node/Gatsby/Webpack/etc on your host machine! Only Docker required (tested on
v17.12.0
). - 🏗 Easy setup: Automatic GatsbyJS site initializion with
gatsby-starter-default
(unless already initialized) - 👍 Simple CLI API:
develop
/stage
/build
- 🆕 Recent NodeJS: Container based on NodeJS
v10.15.2
running in Ubuntu Linux 19.04 - 📃 MIT-licensed
NOTE: Your GatsbyJS site will be created into $GATSBY_ROOT
defined in .makerc
automatically.
Before your either start developing or running nginx in production you should init your environment with the following:
make init
# edit .makerc
make gatsby__docker_build
make gatsby_develop
In other words, build and serve:
make gatsby_stage
Builds production ready site into $GATSBY_ROOT/public
:
make gatsby_build
make gatsby__docker_run cmd=<YOUR-COMMAND-HERE>
For example to install a new NPM-module:
make gatsby__docker_run cmd=yarn add gatsby-transformer-yaml
make gatsby_build
make nginx_stage_build
make nginx_stage_run