mirror of
https://github.com/caprover/caprover
synced 2026-06-19 07:37:08 +00:00
29 lines
543 B
Plaintext
29 lines
543 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
|
|
RUN mv edge-overrride.json overrride.json
|
|
|
|
|
|
# Build frontend code
|
|
|
|
RUN git clone https://github.com/githubsaturn/caprover-frontend.git && \
|
|
cd caprover-frontend && \
|
|
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"]
|