This is all the source files plus the docker-compose file to use to build your Gatsby site
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Brandon Nolet 5221d26922 Added capability to use private git repos as dep srcs 2 months ago
.gitignore Clean up 3 months ago
Dockerfile Added capability to use private git repos as dep srcs 2 months ago
README.md Added capability to use private git repos as dep srcs 2 months ago
build.sh Added capability to use private git repos as dep srcs 2 months ago
docker-compose.yml Added capability to use private git repos as dep srcs 2 months ago

README.md

Note: This container will be using your ssh keys. If you value your security, build this container yourself.

Gatsby Builder

This docker container will take your source Gatsby site files and output the deployment-ready static site files pulling from and writing to your desired directories. These directories are configurable from docker compose.

Setup

Prerequisites

In order to run this container you will need to have Docker and docker-compose installed on your system.

Environment

Run git clone https://gitea.bnolet.me/brandon/gatsby-builder.git to copy all the files to your local machine.

cd gatsby-builder to change into the proper directory.

Create a file named .env and put inside the following values:

USERID=<your-uid>
GROUPID=<your-gid>

You can find these values by entering id -u and id -g in your terminal. This is to ensure the outputted files are accessible to you, the user.

Modify docker-compose.yml to have the ./src and ./public volumes point to your desired folder. For example, if your source files are located in /home/user/hello-world then that is what you would set the source volume to: - /home/user/hello-world:/src. You can set the /public directory to be mapped to a host folder in a similar fashion. The public folder is that which will hold the static site files (html, css, js).

If you’re not pulling from private repos with npm install then you can remove the ssh key line from the volumes section. Otherwise, set the source directory as that which your id_rsa and id_rsa.pub files are located in. This will also use your known_hosts file if you have one.

Building Your Gatsby Project

Once you’ve set up your environment, simply run docker-compose up from the gatsby-builder directory in which the modified docker-compose.yml file resides. The static site files will be deposited in your target folder and should be fully accessible to you.