File tree Expand file tree Collapse file tree 6 files changed +10
-5
lines changed
Expand file tree Collapse file tree 6 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,5 @@ release.zip
4141run
4242
4343data
44+ assets
45+ .env
Original file line number Diff line number Diff line change 11# THIS ENV FILE EXAMPLE ONLY FOR DOCKER COMPOSE
22# SEE https://docs.docker.com/compose/environment-variables/#the-env-file
33JWT_SECRET = asffasgvxczfqreqw213
4- ALLOWED_ORIGINS = https:// innei.ren,https:// www.innei.ren
4+ ALLOWED_ORIGINS = innei.ren,www.innei.ren
Original file line number Diff line number Diff line change 4242
4343data
4444assets
45+ .env
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ services:
66 image : innei/mx-server:latest
77 command : node index.js --redis_host=redis --db_host=mongo --allowed_origins=${ALLOWED_ORIGINS} --jwt_secret=${JWT_SECRET}
88 restart : ' on-failure'
9+ volumes :
10+ - ./data/mx-space:/root/.mx-space
911 ports :
1012 - ' 2333:2333'
1113 depends_on :
@@ -21,7 +23,7 @@ services:
2123 container_name : mongo
2224 image : mongo
2325 volumes :
24- - ./data:/data/db
26+ - ./data/db :/data/db
2527 ports :
2628 - ' 3344:27017'
2729 networks :
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ FROM node:16-alpine as builder
22WORKDIR /app
33COPY . .
44RUN apk add git
5+ RUN git clone https://github.com/mx-space/assets.git --depth=1
6+ RUN rm -rf assets/.git
57RUN npm i -g pnpm
68RUN pnpm install
79RUN pnpm bundle
8- RUN git clone https://github.com/mx-space/assets.git --depth=1
9- RUN rm -rf assets/.git
1010
1111FROM node:16-alpine
1212RUN apk add zip unzip mongodb-tools --no-cache
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ console.log(argv)
1212exports . API_VERSION = 2
1313exports . CROSS_DOMAIN = {
1414 allowedOrigins : argv . allowed_origins
15- ? argv . allowedOrigins ?. split ?. ( ',' )
15+ ? argv . allowed_origins ?. split ?. ( ',' ) || [ ]
1616 : [
1717 'innei.ren' ,
1818 'shizuri.net' ,
You can’t perform that action at this time.
0 commit comments