|Brandon Nolet 5221d26922 Added capability to use private git repos as dep srcs||4 weeks ago|
|.gitignore||1 month ago|
|Dockerfile||4 weeks ago|
|README.md||4 weeks ago|
|build.sh||4 weeks ago|
|docker-compose.yml||4 weeks ago|
Note: This container will be using your ssh keys. If you value your security, build this container yourself.
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.
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:
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.
docker-compose.yml to have the
./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.pub files are located in. This will also use your
known_hosts file if you have one.
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.