mirror of
https://github.com/caprover/caprover
synced 2026-05-29 23:00:54 +00:00
32 lines
621 B
Plaintext
32 lines
621 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
|
|
|
|
RUN mv ./edge-override.json ./config-override.json
|
|
|
|
|
|
# Build frontend code
|
|
|
|
# This quick hack invalidates the cache
|
|
ADD http://worldclockapi.com/api/json/utc/now /time.now
|
|
|
|
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"]
|