dreammall-earth / dreammall.earth

Dreammall.earth website & product page
https://dreammall-earth.github.io/dreammall.earth/
Apache License 2.0
5 stars 1 forks source link
dreammall dreammall-earth

Dreammall.earth

nodejs npm remark-cli vuepress

Dreammall.earth websites & services

Modules

Frontends

Backend

Dev-Op

Deployment

Instructions how to deploy this software are available here

Commands

The following commands are available

Command Description
npm install Project setup
Test
npm run test:lint Run all linters
npm run test:lint:remark Run linter remark
npm test Run all tests & linters
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
Maintenance
npm run update Check for updates

Bare-metal

Install Authentik

# Go in authentik folder
cd $rootFolder/authentik
# Delete existing database
rm -rf database
# Unpack database in database folder
./database.unpack.sh
# Start authentik docker
docker compose up

Start Database

# In new Terminal
cd $rootFolder
# Start database in docker
docker compose up database

Start Backend

# In new Terminal
cd $rootFolder/backend
# Copy .env.dist .env
cp .env.dist .env
# Symbolik for authentik key
ln -s src/auth/public.pem public.pem
nvm use 21
npm install
# Initialize Database
npm run db:reset
# Migration Database
# npm run db:migrate
npm run dev

Start Presenter

# In new Terminal
cd $rootFolder/presenter
cp .env.dist .env
nvm use 21
npm install
export PORT=3001
# Run dev mode
npm run dev
# Run prod mode (faster)
# npm run prod

Start Frontend

# In new Terminal
cd $rootFolder/frontend
cp .env.dist .env
nvm use 21
npm install
# export PORT=3000(default)
# Run dev mode (for development)
npm run dev
# Run prod mode (faster)
# npm run prod

Start Admin

# In new Terminal
cd $rootFolder/admin
cp .env.dist .env
nvm use 21
npm install
export PORT=3002
# Run dev mode
npm run dev
# Run prod mode (faster)
# npm run prod

Docker

The following endpoints are provided for docker compose

Endpoint Description
http://localhost:3306 MySQL Database
http://localhost:3000 Presenter
http://localhost:8081 Presenter Documentation
http://localhost:6006 Presenter Storybook
http://localhost:3001 Frontend
http://localhost:8082 Frontend Documentation
http://localhost:6007 Frontend Storybook
http://localhost:3002 Admin
http://localhost:8083 Admin Documentation
http://localhost:6008 Admin Storybook
http://localhost:4000/graphql Backend GraphQL API
http://localhost:4000/playground Backend GraphQL Playground
http://localhost:8084 Backend Documentation
http://localhost:8080 Documentation

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