fix build

This commit is contained in:
2026-04-26 04:30:05 -04:00
parent ce4e314920
commit 7a745964c4
4 changed files with 38 additions and 34 deletions
+4
View File
@@ -0,0 +1,4 @@
node_modules
.next
.git
*.log
+2 -1
View File
@@ -10,7 +10,7 @@ services:
working_dir: /app working_dir: /app
volumes: volumes:
- .:/app - .:/app
- ./node_modules:/app_backup/node_modules - node_modules:/app/node_modules
# - ./run.sh:/app/run.sh # - ./run.sh:/app/run.sh
# - ./next:/app/.next # - ./next:/app/.next
image: registry.chiefsoft.net/merms-web-2025:latest image: registry.chiefsoft.net/merms-web-2025:latest
@@ -24,3 +24,4 @@ services:
- NODE_ENV=${NODE_ENV:-live} - NODE_ENV=${NODE_ENV:-live}
volumes: volumes:
src: src:
node_modules:
+29 -30
View File
@@ -1,6 +1,6 @@
FROM alpine:3.20 FROM alpine:3.22
ENV NODE_VERSION 22.12.0 ENV NODE_VERSION=22.12.0
RUN addgroup -g 1000 node \ RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \ && adduser -u 1000 -G node -s /bin/sh -D node \
@@ -77,31 +77,31 @@ RUN addgroup -g 1000 node \
&& node --version \ && node --version \
&& npm --version && npm --version
ENV YARN_VERSION 1.22.22 # ENV YARN_VERSION 1.22.22
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ # 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 # # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
&& export GNUPGHOME="$(mktemp -d)" \ # && export GNUPGHOME="$(mktemp -d)" \
&& for key in \ # && for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \ # 6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \ # ; do \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \ # gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ # gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
done \ # done \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ # && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ # && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ # && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& gpgconf --kill all \ # && gpgconf --kill all \
&& rm -rf "$GNUPGHOME" \ # && rm -rf "$GNUPGHOME" \
&& mkdir -p /opt \ # && mkdir -p /opt \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ # && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ # && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ # && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ # && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& apk del .build-deps-yarn \ # && apk del .build-deps-yarn \
# smoke test # # smoke test
&& yarn --version \ # && yarn --version \
&& rm -rf /tmp/* # && rm -rf /tmp/*
COPY docker-entrypoint.sh /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/
# ENTRYPOINT ["docker-entrypoint.sh"] # ENTRYPOINT ["docker-entrypoint.sh"]
@@ -118,19 +118,18 @@ COPY package.json /app/
# Install app dependencies # Install app dependencies
RUN npm install --save RUN npm install --save
RUN npm install react-scripts RUN npm install react-scripts
RUN npm install -g next
RUN npm install sharp RUN npm install sharp
RUN npm install react-modal-video RUN npm install react-modal-video
RUN npm install wowjs RUN npm install wowjs
# Bundle app source # Bundle app source
COPY . /app COPY . /app
RUN cp -a /app/. /app_backup # RUN cp -a /app/. /app_backup
RUN chmod a+x /usr/local/bin/docker-entrypoint.sh RUN chmod a+x /usr/local/bin/docker-entrypoint.sh
EXPOSE 3000 EXPOSE 3000
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ] ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ]
#CMD ["sh", "-c", "next build && next start"] CMD ["sh", "-c", "npm run build && npm run start"]
CMD [ "npm" ,"run","dev"] # CMD [ "npm" ,"run","dev"]
+3 -3
View File
@@ -1,9 +1,9 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const path = require('path')
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
experimental: { outputFileTracingRoot: path.join(__dirname),
serverActions: true,
},
} }
module.exports = nextConfig module.exports = nextConfig