Restructuring the Project
Updating dependencies
This commit is contained in:
26
Dockerfile
26
Dockerfile
@ -1,25 +1,31 @@
|
||||
FROM node:12
|
||||
|
||||
FROM node:18-alpine
|
||||
LABEL maintainer="Fabian Stamm <dev@fabianstamm.de>"
|
||||
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN npm config set registry https://npm.hibas123.de
|
||||
# COPY ["package.json", "yarn.lock", ".yarnrc.yml", "/usr/src/app/"]
|
||||
# COPY .yarn /usr/src/app/.yarn
|
||||
# COPY Backend /usr/src/app/Backend
|
||||
# COPY Frontend /usr/src/app/Frontend
|
||||
# COPY FrontendLegacy /usr/src/app/FrontendLegacy
|
||||
|
||||
COPY ["package.json", "package-lock.json", "tsconfig.json", "/usr/src/app/"]
|
||||
COPY . /usr/src/app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
# RUN rm -rf /usr/src/app/Backend/node_modules &&\
|
||||
# rm -rf /usr/src/app/Frontend/node_modules &&\
|
||||
# rm -rf /usr/src/app/FrontendLegacy/node_modules &&\
|
||||
# rm -rf /usr/src/app/Backend/logs &&\
|
||||
# rm -rf /usr/src/app/Backend/keys
|
||||
|
||||
RUN npm install
|
||||
RUN yarn install
|
||||
RUN yarn build
|
||||
|
||||
COPY lib/ /usr/src/app/lib
|
||||
COPY views/out /usr/src/app/views/out/
|
||||
COPY views_repo/build /usr/src/app/views_repo/build
|
||||
RUN ln -s /usr/src/app/logs /usr/src/app/Backend/logs && ln -s /usr/src/app/keys /usr/src/app/Backend/keys
|
||||
|
||||
VOLUME [ "/usr/src/app/logs", "/usr/src/app/keys"]
|
||||
|
||||
EXPOSE 3004/tcp
|
||||
|
||||
WORKDIR /usr/src/app/Backend
|
||||
CMD ["npm", "run", "start"]
|
||||
|
Reference in New Issue
Block a user