mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-04-28 03:39:54 +00:00
Working dockerfile
This commit is contained in:
parent
0d68fea0eb
commit
c11da3df3d
3 changed files with 5 additions and 4 deletions
|
|
@ -59,7 +59,8 @@ FROM base as app
|
|||
#COPY --chown=abc:abc package.json yarn.lock ./
|
||||
COPY --chown=abc:abc package*.json ./
|
||||
COPY --chown=abc:abc patches ./patches
|
||||
COPY --from=build --chown=abc:abc /app/build /app/build
|
||||
COPY --from=build --chown=abc:abc /app/dist /app/dist
|
||||
COPY --from=build --chown=abc:abc /app/src /app/src
|
||||
COPY --from=base /usr/local/bin /usr/local/bin
|
||||
COPY --from=base /usr/local/lib /usr/local/lib
|
||||
|
||||
|
|
@ -77,8 +78,6 @@ ENV IS_DOCKER=true
|
|||
RUN npm install --omit=dev \
|
||||
&& npm cache clean --force \
|
||||
&& chown -R abc:abc node_modules \
|
||||
&& rm -rf node_modules/ts-node \
|
||||
&& rm -rf node_modules/typescript \
|
||||
&& rm -rf node_modules/@types
|
||||
|
||||
ARG webPort=9078
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
# NODE_ARGS can be passed by ENV in docker command like "docker run foxxmd/multi-scrobbler -e NODE_ARGS=--optimize_for_size"
|
||||
echo -e "\nmulti-scrobbler is starting!"
|
||||
export NODE_ENV=production
|
||||
cd /app || exit
|
||||
exec \
|
||||
s6-setuidgid abc /usr/bin/node $NODE_ARGS /app/build/server.js
|
||||
s6-setuidgid abc /usr/bin/node $NODE_ARGS /app/node_modules/.bin/tsx /app/src/backend/index.ts
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export const initServer = async (parentLogger: Logger, initialOutput: LogInfo[]
|
|||
setupApi(app, logger, initialOutput);
|
||||
|
||||
const server = app.listen(port);
|
||||
ViteExpress.config({mode: isProd ? 'production' : 'development'});
|
||||
ViteExpress.bind(app, server);
|
||||
|
||||
const addy = getAddress();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue