mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
convert analytics to TS
This commit is contained in:
1 parent
fb69cb4e10
commit
923de901c4
24 files changed
+11093
-211
No files matched your search
@@ -2,7 +2,7 @@ import Docker from 'dockerode'
|
||||
import config, { getQuestImage } from '../config.js'
|
||||
import logger from '../utils/logger.js'
|
||||
|
||||
const engine = new Docker()
|
||||
const engine = new Docker({ socketPath: '//./pipe/docker_engine' })
|
||||
|
||||
const containerOptions = {
|
||||
AttachStdin: true,
|
||||
@@ -29,8 +29,8 @@ export function createContainer(
|
||||
if (!config.isProduction && hostPwd && mountQuest === questId) {
|
||||
logger.info('Mounting quest folder', mountQuest)
|
||||
option.HostConfig!.Binds = [
|
||||
`${hostPwd}/quests/${mountQuest}/home:/home/commander`,
|
||||
`${hostPwd}/packages/container:/usr/local/lib/container`,
|
||||
`${hostPwd.replace(/\\/g, '/')}/quests/${mountQuest}/home:/home/commander`,
|
||||
`${hostPwd.replace(/\\/g, '/')}/packages/container:/usr/local/lib/container`,
|
||||
]
|
||||
}
|
||||
return engine.createContainer(option)
|
||||
@@ -62,7 +62,7 @@ export async function attachContainer(
|
||||
Tty: true,
|
||||
Env: [
|
||||
`TOKEN=${token}`,
|
||||
`API_ENDPOINT=${config.backendUrl}`,
|
||||
`API_ENDPOINT=http://backend:3000`,
|
||||
'ZDOTDIR=/etc/zsh',
|
||||
],
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user