This commit is contained in:
CHIEFSOFT\ameye
2024-12-23 21:46:01 -05:00
parent 60ac57584e
commit 6384470143
2 changed files with 22 additions and 32 deletions
+4 -3
View File
@@ -1,11 +1,9 @@
version: '3'
services:
merms-mainsite-2025:
merms-mainsite2025:
build:
context: .
dockerfile: docker/Dockerfile
args:
- NODE_ENV=development
restart: unless-stopped
ports:
- ${APP_PORT}:3000
@@ -16,6 +14,9 @@ services:
- ./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
tty: true
stdin_open: true
volumes:
+18 -29
View File
@@ -1,6 +1,6 @@
FROM alpine:3.19
FROM alpine:3.20
ENV NODE_VERSION 18.20.4
ENV NODE_VERSION 22.12.0
RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
@@ -10,7 +10,7 @@ RUN addgroup -g 1000 node \
curl \
&& ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
x86_64) ARCH='x64' CHECKSUM="ac4fe3bef38d5e4ecf172b46c8af1f346904afd9788ce12919e3696f601e191e" OPENSSL_ARCH=linux-x86_64;; \
x86_64) ARCH='x64' CHECKSUM="43532120bad06cdea17c2ffba81ebfcff4611532a3569ef996faa39aadcbc759" OPENSSL_ARCH=linux-x86_64;; \
x86) OPENSSL_ARCH=linux-elf;; \
aarch64) OPENSSL_ARCH=linux-aarch64;; \
arm*) OPENSSL_ARCH=linux-armv4;; \
@@ -41,18 +41,14 @@ RUN addgroup -g 1000 node \
&& export GNUPGHOME="$(mktemp -d)" \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
C0D6248439F1D5604AAFFB4021D900FFDB233756 \
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
61FC681DFB92A079F1685E77973F295594EC4689 \
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
A363A499291CBBC940DD62E41F10027AF002F8B0 \
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
; do \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
@@ -81,7 +77,7 @@ RUN addgroup -g 1000 node \
&& node --version \
&& npm --version
ENV YARN_VERSION 1.22.19
ENV YARN_VERSION 1.22.22
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
@@ -107,7 +103,7 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& yarn --version \
&& rm -rf /tmp/*
# COPY docker-entrypoint.sh /usr/local/bin/
COPY docker-entrypoint.sh /usr/local/bin/
# ENTRYPOINT ["docker-entrypoint.sh"]
RUN mkdir -p /app
@@ -115,29 +111,22 @@ RUN mkdir -p /app
# set working directory
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install app dependencies
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 . /app
COPY . ./app
# build app
#RUN npm run-script build
# install app dependencies
RUN npm install
RUN npm install react-scripts
RUN npm install -g next
RUN npm install sharp
RUN npm install react-modal-video
RUN npm install wowjs
# start app
#CMD ["serve", "-s", "build"]
#CMD ["npm", "run", "dev"]
#RUN npm run build
#CMD ["npm", "run", "start"]
CMD ["sh", "-c", "next build && next start"]
#CMD ["sh", "-c", "next build && next start"]
CMD [ "npm" ,"run","dev"]