I have a question, why do we need to use VOLUME option in our docker-compose when we use for React/Next.js ? If I understood, we use VOLUME to "save the data", for example when we use database. But with React/Next.js we just use to pass the node_modules and app path, for me it does not ..
I did a lot of search on this topic but still don’t know a good solution for my problem. So I thought maybe someone can guide me into this. About the project We’re basically planning to build a shop builder, each shop (website) has the same theme, but its content, which is fetched from an ..
NEXTJS requires env variables for build but not after. Originally using ARG but this seems more secure (ephemeral). However struggling with the documentation on multiple secrets and getting those secrets into a .env file. Any thoughts on what I’m doing wrong here? RUN –mount=type=secret,id=NEXT_PUBLIC_PROJECT_ID cat /run/secrets/NEXT_PUBLIC_PROJECT_ID >> .env.local –mount=type=secret,id=NEXT_PUBLIC_IDENTITY_API_KEY cat /run/secrets/NEXT_PUBLIC_IDENTITY_API_KEY >> .env.local –mount=type=secret,id=PRIVATE_KEY cat ..
so I am using lerna and everything works fine on local but when I try to build the image and run it through docker it seems to be not working as supposed to FROM node:16-alpine3.11 ENV NODE_ENV=production COPY . /app WORKDIR /app RUN npm i -g lerna RUN lerna bootstrap CMD npm run dev:all this ..
I have a backend API written in Laravel, a frontend app written in NextJS and these are containerized with Docker using NGinx. Here is my docker-compose.yml file: version: ‘3.9’ services: # frontend nextjs app nextjs: build: ./hike-frontend container_name: nextjs volumes: – ./hike-frontend:/usr/app – /app/node_modules – /app/.next restart: always networks: – app-network # API Laravel app ..
I have been developing an application with Next.js and PostgreSQL. I have 3 dockerfiles, one for my hosting my next.js app, and two for two PostgreSQL databases. I have no problem with any of them when running docker build and docker run, but when I tried setting up docker compose and the two database containers ..
I tried to dockerize strapi’s next.js corporate starter app. I used production optimized next.js Dockerfile from next.js offcial docs (along with strapi Dockerfile). Running docker-compose build (yml) resulted in strapi image being built and in next.js image build failure (as it was trying to access initial pages data from not-yet-existing strapi container): FetchError: request to ..
I’m trying to dockerize strapi cms corporate starter. Locally, when installed with npx, both backend/frontend communicate without a problem. When I run docker-compose build –no-cache –force-rm the Strapi container builds sucessfully, but the Next container fails with the following error: 17 476.4 info – Compiled successfully 17 476.4 info – Collecting page data… 17 482.2 ..
first of all i am not an expert with docker deployment. The problem i have is that the revalidate feature suddenly stopped working and only work again only if i restart the docker container. For ex. The stock on one of the product did not change. The webapp built using nextjs v.10 it is e-com ..
I’m using a Dockerfile referenced at https://nextjs.org/docs/deployment#docker-image. At the runner stage it has the following steps: COPY –from=builder /app/next.config.js ./ COPY –from=builder /app/public ./public COPY –from=builder –chown=nextjs:nodejs /app/.next ./.next COPY –from=builder /app/node_modules ./node_modules COPY –from=builder /app/package.json ./package.json Should I then also copy tailwind.config.js, postcss.config.js at the runner stage given I have them as part of ..