Skip to content

dreammall-earth/dreammall.earth

Repository files navigation

Dreammall.earth

nodejs npm remark-cli vuepress

Dreammall.earth websites & services

Modules

Commands

The following commands are available:

Command Description
npm install Project setup
Test
npm run remark Run linter remark
Documentation
npm run docs:dev Run Documentation in development mode
npm run docs:build Build static documentation
Release
npm run release Propagate release version & generate changelog

Shared Setup

Make sure you have docker installed on your system.

Start authentik and mariadb database:

docker compose up -d --wait authentik authentik-worker database

A) Run applications with Docker

Run database migrations:

docker compose run --rm backend npm run db:reset

Start your desired applications:

docker compose up backend frontend presenter

B) Run applications locally

Ensure you are using a node --version that matches the one specified in .tool-versions. E.g. you could install asdf-vm.

Set a temporary variable for the upcoming steps:

export rootFolder=$(pwd)

Setup backend:

cd $rootFolder/backend
cp .env.dist .env
npm install
npm run db:reset

Setup Frontend

cd $rootFolder/frontend
cp .env.dist .env
npm install

Setup presenter:

cd $rootFolder/presenter
cp .env.dist .env
npm install

Start Services

cd backend
npm run dev
cd frontend
npm run dev
cd presenter
export PORT=3001
npm run dev

Endpoints

The following endpoints are provided for docker compose up:

Endpoint Description
http://localhost:3306 MySQL Database
http://localhost:3000 Presenter
http://localhost:6006 Presenter Storybook
http://localhost:3001 Frontend
http://localhost:6007 Frontend Storybook
http://localhost:4000 Backend GraphQL Playground
http://localhost:8080 Documentation
http://localhost:8080 Mailpit
http://localhost:8080 Authentik

Clean up docker

If you run into issues with some docker left-overs, you can always stop+remove containers and volumes:

docker compose down -v

Check if you still have docker containers left:

docker container ls -a

If so, you can do:

docker container stop $(docker container ls -qa)
docker container rm $(docker container ls -qa)

Prune docker caches:

docker system prune

Remove all your volumes:

docker volume remove $(docker volume list -q)

OK, this is ultima ratio, remove everything (even images) with:

docker system prune -a

How to release

Generate a new version using npm version --git-tag-version=false patch|minor|major. Then run npm run release to propagate the new version and generate the changelog

Update

You can get a list of packages to update by running npm run update.

Appending -u will also update the packages in the package.json. You have to run npm install again after.

npm run update -- -u
npm install

External Tools

This project is tested with Browserstack.

License

Apache 2.0