mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
able to run server without in docker
This commit is contained in:
1 parent
19cd66475c
commit
ec4e97a7d6
4 files changed
+4
-8
No files matched your search
+1
-2
@@ -15,8 +15,7 @@
|
||||
"app": "yarn workspace app dev",
|
||||
"app:local": "yarn workspace app dev:local",
|
||||
"build": "yarn workspaces foreach -Apt run build",
|
||||
"watch": "yarn workspaces foreach -Rpi --from '{server,app}' run watch",
|
||||
"build:watch": "concurrently -n server,file-graph,utils,models,constants -c blue,green,yellow,cyan,red \"tsc -w -p server\" \"tsc -w -p packages/file-graph\" \"tsc -w -p packages/utils\" \"tsc -w -p packages/models\" \"tsc -w -p packages/constants\"",
|
||||
"dev": "yarn workspaces foreach -Rpi --from '{server,app}' run watch",
|
||||
"server": "yarn workspace server dev",
|
||||
"cli": "yarn workspace client start",
|
||||
"lint": "eslint .",
|
||||
|
||||
@@ -44,7 +44,7 @@ const config = {
|
||||
bugReportUrl: getUrl('BUG_REPORT_URL', ''),
|
||||
|
||||
docker: {
|
||||
network: get('DOCKER_NETWORK', 'linux-odyssey-players'),
|
||||
network: get('DOCKER_NETWORK', 'host'),
|
||||
defaultImage: get('QUEST_IMAGE', 'linuxodyssey/quest-base'),
|
||||
imagePrefix: get('DOCKER_PREFIX', 'linuxodyssey/quest-'),
|
||||
mountQuest: get('MOUNT_QUEST', ''),
|
||||
@@ -57,6 +57,7 @@ const config = {
|
||||
}
|
||||
|
||||
config.baseUrl = get('BASE_URL', `http://${config.host}:${config.port}`)
|
||||
config.backendUrl = get('BACKEND_URL', config.baseUrl)
|
||||
config.testing = {
|
||||
enabled: !config.isProduction && process.env.TESTING === 'true',
|
||||
username: get('TESTING_USERNAME', ''),
|
||||
|
||||
@@ -16,8 +16,6 @@ const containerOptions = {
|
||||
},
|
||||
}
|
||||
|
||||
// const network = engine.getNetwork(config.dockerNetwork)
|
||||
|
||||
export function createContainer(name, questId) {
|
||||
const option = {
|
||||
...containerOptions,
|
||||
@@ -56,7 +54,7 @@ export async function attachContainer(container, { token }) {
|
||||
Tty: true,
|
||||
Env: [
|
||||
`TOKEN=${token}`,
|
||||
`API_ENDPOINT=http://backend:3000`,
|
||||
`API_ENDPOINT=${config.backendUrl}`,
|
||||
'ZDOTDIR=/etc/zsh',
|
||||
],
|
||||
})
|
||||
|
||||
@@ -41,7 +41,6 @@ async function loadGlobalExceptions() {
|
||||
export async function loadAndUpdateQuests() {
|
||||
await Quest.deleteMany({})
|
||||
const { exceptions } = await loadGlobalExceptions()
|
||||
console.log(exceptions)
|
||||
return mapQuests(async (id, questPath) => {
|
||||
const files = await fs.readdir(questPath)
|
||||
if (!files.includes('game.yml')) {
|
||||
@@ -64,7 +63,6 @@ export async function loadAndUpdateQuests() {
|
||||
quest.exceptions.push(...exceptions)
|
||||
await quest.save()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
logger.error(`Error parsing quest`, { id, error })
|
||||
throw new QuestValidationError(`Error parsing quest`, id, error)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user