Monorepo of a project for the high school Gymnasium Otterndorf build with Nest.js + Riba.js + Strapi
This project has an open API, for more information see here.
We are using yarn 2 because we make use of the workspace feature of yarn 2 for this monorepo.
We ignore Strapi in the workspace because it is currently not compatible with Yarn 2 PnP, so we use npm
for this and excluded it from yarn's workspace (there is no other way to use npm instead of yarn 2 for this package).
This repository has submodules, so you need to clone this repository with it's submodules:
git clone --recurse-submodules https://github.com/ArtCodeStudio/riba-nest-projects.git
cd riba-nest-projects
If you have already pulled the repository you can just run:
git submodule update --init --recursive
git pull --recurse-submodules
To install the dependencies of all projects inside the workspace just run:
yarn install
To install the dependencies which are excluded from the workspace (because they are not compatible with yarn 2) run:
yarn install:strapi && yarn install:strapi-student
The App Manager uses pm2
to start the apps from the config, you can install pm2 globally to make use of the pm2 cli tools like pm2 logs
to show the app logs in realtime.
npm install pm2@latest -g
git clone https://github.com/ArtCodeStudio/riba-nest-projects.git
cd riba-nest-projects
git submodule update --init --recursive
yarn install
cd app/theme
yarn run build
cd app/nest
yarn run build
cd app/common
yarn run build
cd app/strapi
npm run build
cd app/strapi-student
npm run build
We are using pm2 to manage the running app instances. For this we have defined some pm2 config files for different environment, e.g. pm2.dev.config
in the root of this repository.
You can start pm2 for this environments with:
This environment is intended for development, the apps are started in watch mode and automatically restarted or rebuilt when changes are made.
yarn run start:dev
# or
pm2 start ./pm2.dev.config.js
This environment is intended for local development, where the apps are also started in watch mode, but the Strapi instances will not be started. So the Strapi instances must therefore run on the server.
yarn run start:local
# or
pm2 start ./pm2.local.config.js
This sets the app instances in production mode. This means that the apps do not start in watch mode.
yarn run start:prod
# or
pm2 start ./pm2.prod.config.js
We have two strapi instances for this project. One for teachers and school administration and one fpr students.
Please note, the strapi sub-projects are not part of the yarn 2 workspace because they are not working with yarn 2 at the moment, so please use npm
here.
Checkout the upgrade guide.
In short:
npm install -g npm-check
cd apps/gymott/strapi # or strapi-student
pm2 list
# see which id the strapi process has
pm2 stop <id>
npm-check -u # Can be installed with `npm install -g npm-check`
# Select latest strapi versions here
# Please note: Maybe there are new plugins for the new strapi version, check the source for new plugins and install theme
npm run build -- --clean
pm2 start <id>
pm2 logs <id>
# Check here if Strapi starts properly
Checkout the styles in app/theme/styles/.
For all used theme colors see _variables-bootstrap.scss and entry-type-color.ts