Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (23 sloc) 786 Bytes
FROM node:10
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Build backend code.
COPY . /usr/src/app
RUN npm install --production && \
npm cache clean --force && \
npm run build
# Build frontend code using a fixed hash commit.
ENV FRONTEND_COMMIT_HASH 53fdddba642a74d0a38ca249c99f809f297cc069
RUN mkdir -p /usr/src/app-frontend && cd /usr/src/app-frontend && \
git clone https://github.com/githubsaturn/caprover-frontend.git && \
cd caprover-frontend && \
git reset --hard ${FRONTEND_COMMIT_HASH} && \
npm install --production && npm cache clean --force && \
npm run build && \
mv ./build ../../app/dist-frontend && \
cd / && \
rm -rf /usr/src/app-frontend
ENV NODE_ENV production
ENV PORT 3000
EXPOSE 3000
CMD ["npm" , "start"]
You can’t perform that action at this time.