Run production build

This commit is contained in:
tokslaw7
2024-08-08 03:53:13 +00:00
parent d4acf6eb87
commit 6563292217
2 changed files with 13 additions and 6 deletions
+2
View File
@@ -13,6 +13,8 @@ services:
- ./:/app
- ./src/:/app/src
- ./run.sh:/app/run.sh
- ./node_modules:/app/node_modules
- ./next:/app/.next
extra_hosts:
- backend.wrenchboard.api.live:10.10.33.15
- backend.wrenchboard.api.test:10.10.33.15
+11 -6
View File
@@ -110,6 +110,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
# COPY docker-entrypoint.sh /usr/local/bin/
# ENTRYPOINT ["docker-entrypoint.sh"]
RUN mkdir -p /app
# set working directory
WORKDIR /app
@@ -117,22 +119,25 @@ WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
# install app dependencies
COPY package.json ./
#COPY package-lock.json ./
COPY package.json /app
#COPY package-lock.json /app
RUN npm install --silent
#RUN npm install react-scripts@3.4.1 -g --silent
#RUN npm install -g serve
RUN npm install -g next
RUN npm install sharp
# add app
COPY . ./
COPY . /app
# build app
#RUN npm run-script build
# start app
#CMD ["serve", "-s", "build"]
CMD ["npm", "run", "dev"]
#CMD ["npm", "run", "dev"]
#RUN npm run build
#CMD ["npm", "run", "start"]
CMD ["sh", "-c", "next build && next start"]
#RUN npm run-script build
#CMD ["npm", "run", "start"]