Lin, Hung-Shin f8254b55c9 Merge pull request #45 from linux-odyssey/quest
Add new functions for quest:

* new condition logic `or` & `not`: able to create nested condition
* new condition `files`: checks if a file or folder exists in the container
  * not support globbing yet
* send "pending" status when executing story, and set it back after execution
* include completed stage id in command

Dockerfile refactor:
* use multi-staged building
* remove Dockerfile.dev

Container:

* use axios instead of `fetch`

Other improvements:

* deactivate other sessions when creating a new one
* clear terminal on reset
2023-10-30 14:42:34 +08:00
2023-08-28 14:39:52 +08:00
2023-08-22 12:11:58 +08:00
2023-10-30 13:53:43 +08:00
2023-08-22 11:16:37 +08:00
2023-08-23 10:56:21 +08:00
2023-09-25 13:28:52 +08:00
2023-08-23 10:56:21 +08:00
2023-10-12 21:59:25 +08:00
2023-10-03 21:59:37 +08:00
2023-10-29 17:42:31 +08:00

Linux Odyssey

Requirements

  • NodeJS
  • Docker
  • Yarn

Installation

git clone https://github.com/lancatlin/linux-odyssey.git
cd linux-odyssey
yarn install

Development

Run everything (frontend, backend, db, swagger, quests):

docker compose build
docker compose up -d

If you want to enable social login, you should have OAuth client token in a .env file:

docker compose --env-file .env up -d

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 compose -f docker-compose.testing.yml run cypress

# tearing off the containers
docker compose -f docker-compose.testing.yml 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
S
Description
No description provided
Readme GPL-3.0
8.1 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 64%
Vue 24.2%
Go 4.2%
Shell 2.1%
Handlebars 2.1%
Other 3.3%