diff --git a/.dockerignore b/.dockerignore index 285d13034..38ca00162 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,3 @@ -# we dont want default config to be loaded in the dockerfile, but rather using a volume -config.json # build stuff node_modules public \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index aa9eb3dc3..086240b5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,22 @@ -FROM node:14-alpine +FROM node:18-alpine # Without git installing the npm packages fails RUN apk add git RUN mkdir /app WORKDIR /app COPY . /app -RUN npm install -RUN npm run build +# install python and other dependencies +RUN apk add python3 make g++ cairo-dev pango-dev jpeg-dev giflib-dev librsvg-dev +# install pnpm +RUN npm i -g pnpm@9.0.4 +RUN pnpm install +# only for prod +RUN pnpm run build +# --- +EXPOSE 8080 +# uncomment for development +# EXPOSE 9090 +# VOLUME /app/src +# VOLUME /app/prismarine-viewer +# ENTRYPOINT ["pnpm", "run", "run-all"] +# only for prod ENTRYPOINT ["npm", "run", "prod-start"]