mirror of
https://github.com/caprover/caprover
synced 2026-10-01 19:15:59 +00:00
37 lines
626 B
Plaintext
37 lines
626 B
Plaintext
FROM node:10
|
|
RUN mkdir -p /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
|
|
# Build backend code
|
|
|
|
COPY package.json /usr/src/app/
|
|
RUN npm install && npm cache clean --force
|
|
COPY . /usr/src/app
|
|
RUN npm run build
|
|
|
|
|
|
|
|
|
|
# Build frontend code
|
|
|
|
ENV FRONTEND_COMMIT_HASH 79859ddcc0b0b1530a1f3c51420b8a3a6370dc69
|
|
|
|
RUN git clone https://github.com/githubsaturn/caprover-frontend.git && \
|
|
cd caprover-frontend && \
|
|
git reset --hard ${FRONTEND_COMMIT_HASH} && \
|
|
npm install && npm cache clean --force && \
|
|
npm run build && \
|
|
mv ./build ../dist-frontend
|
|
|
|
|
|
|
|
|
|
ENV NODE_ENV production
|
|
ENV PORT 3000
|
|
EXPOSE 3000
|
|
|
|
CMD ["npm" , "start"]
|