mirror of
https://github.com/caprover/caprover
synced 2026-05-04 10:40:34 +00:00
36 lines
594 B
Plaintext
36 lines
594 B
Plaintext
FROM node:10
|
|
RUN mkdir -p /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
|
|
# Build backend code
|
|
|
|
COPY . /usr/src/app
|
|
RUN npm install && npm cache clean --force
|
|
RUN npm run build
|
|
|
|
|
|
|
|
|
|
# Build frontend code
|
|
|
|
ENV FRONTEND_COMMIT_HASH 21b6f6f1369f86cc6abbf48ff3d793e5a962bb1a
|
|
|
|
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"]
|