Skip to content
Snippets Groups Projects
README.md 902 B
Newer Older
alain's avatar
alain committed
## Public Stack Site

alain's avatar
alain committed
Site for Public Stack project with Strapi as backend and Gatsby as frontend.

Upon each update in Strapi the Gatsby build command is called (see /backend/api/util/services/Util.js).

A separate nginx Docker container serves the files generated by the Gatby build process.


### build docker image
```shell
./build.sh
```
Builds Docker image from the Dockerfile.


### start docker containers
```shell
./up.sh
```

Starts two containers:
alain's avatar
alain committed
- container with Strapi and Gatsby (note: /backend/db, /backend/public/uploads/ & /backend/.env should be present in directory)
- container with nginx (serves whatever is present in Docker volumne 'public-stack-site-volume', mapped to Gatby build folder /frontend/public)
alain's avatar
alain committed


### stop docker containers
```shell
./down.sh
```

taco@waag.org's avatar
taco@waag.org committed
Stops and removes containers.
alain's avatar
alain committed


### versions

This setup works on node v14 and yarn v1. Newer version might not work.