/gatsby-demo

Gatsby demo project

Primary LanguageJavaScriptMIT LicenseMIT

Docker Image CI Hits License: MIT

Gatsby demo project

Pre-requisites

  • Docker
  • curl
  • nvm - Optional, only if you planning too build the project locally
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$(curl -sL https://api.github.com/repos/nvm-sh/nvm/releases/latest  | grep '"tag_name":' | awk -F '"' '{printf("%s",$4)}' | cut -c 2-)/install.sh | bash
nvm install 16
nvm use 16

Build unprivileged Nginx docker image

DOCKER_LOGIN=andriykalashnykov
DOCKER_BUILDKIT=1 docker build -t $DOCKER_LOGIN/gatsby-nginx:latest .

Run docker container

docker run --rm -it -p 8080:8080 $DOCKER_LOGIN/gatsby-nginx:latest

Open app in browser

xdg-open http://localhost:8080/

Build project locally

npm install --global yarn
yarn install --network-timeout 1000000 && yarn build