Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/isaacs/node-tar/commit/bef7b1e4ffab822681fea2a9b22187192ed14717"><code>bef7b1e</code></a> 6.2.1</li> <li><a href="https://github.com/isaacs/node-tar/commit/fe8cd57da5686f8695415414bda49206a545f7f7"><code>fe8cd57</code></a> prevent extraction in excessively deep subfolders</li> <li><a href="https://github.com/isaacs/node-tar/commit/fe7ebfdcede1f8a2e65db12e19ecc4b3a9934648"><code>fe7ebfd</code></a> remove security.md</li> <li>See full diff in <a href="https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/linux-odyssey/linux-odyssey/network/alerts). </details>
Linux Odyssey
Requirements
- NodeJS
- Docker
- Yarn
Installation
git clone https://github.com/lancatlin/linux-odyssey.git
cd linux-odyssey
yarn install
Development
Run mongoDB first:
docker compose -f docker-compose.dev.yml up -d db
The db will automatically restarts by Docker.
Build up dependencies:
yarn build:deps
Run dev server (frontend, backend):
yarn dev
If you want to enable social login, you should have OAuth client token in a .env file:
Build Quest Images
In each quest folder, there is a game.yml file, which is the quest definition. And a optional Dockerfile to overwrite the base image. If you want to include additional files, put them in a home folder. The files in home will not be copied to the image automatically, you have to copy them in the Dockerfile.
quests/
├── Dockerfile # Base image
├── discover
│ └── game.yml
├── helloworld
│ ├── Dockerfile # Overwrite the image
│ ├── game.yml
│ └── home # Include additional files
│ └── forgotten_scroll.txt
├── read
│ └── game.yml
└── spell
├── Dockerfile
├── game.yml
└── home
└── ancient_scroll.txt
To build all quests:
yarn build:quests
The base image is built with docker-compose, so you can use docker compose build base to rebuild it. Once you rebuild the base image, you have to rebuild all quests.
Testing
Run Cypress locally, using the current development containers:
docker compose up -d
yarn test:e2e
Run Cypress in container, create brand-new containers along with it:
./docker-scripts.sh test
# or with building
./docker-scripts.sh test --build
# tearing off the containers
./docker-scripts.sh down
Deployment
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml push
# Server side
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d
To enable social login, you should have OAuth client token in a .env file:
You can copy from example.env
# .env
BASE_URL=https://example.com
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
To enable it:
docker compose --env-file .env -f docker-compose.prod.yml up -d
Standalone App (without Docker)
Source: app/
# Connect to dev server (https://odyssey.wancat.cc)
yarn app
# Connect to localhost (http://localhost:3000)
yarn app:local
# Connect to anyhost
API_ENDPOINT=http://example.com yarn app:local
Swagger
docker compose up -d swagger
Open http://localhost:8080 to open Swagger
CLI terminal client (Docker not required)
yarn cli
Usage: client [options] [command]
Options:
-s, --session <string> Session ID
-c, --create Create a new session
-h, --host <string> Server host (default: "http://localhost:3000")
--help display help for command
Commands:
list List all sessions
connet to recent session:
yarn cli
connect to new session:
yarn cli -c
connect to specific session:
yarn cli -s 64d0de0367459c13004bc83f
connect to other host:
yarn cli -h https://example.com
list sessions:
yarn cli list