I try to build an image for a client app (nextjs app), but the build keeps failing. This is the docker file: FROM node:12.18.3 WORKDIR /app ENV PATH /app/node_modules/.bin:$PATH COPY package.json /app/ COPY package-lock.json /app/ RUN npm install COPY . /app RUN npm build # start app CMD [ "npm", "start" ] It fails on ..
I need to execute a shell script from within Docker. I am not as proficient in Docker or in scripting as I would like to be. The script has no effect and does not print anything to the screen. I do not believe that it is being called. What am I doing wrong here? The ..
I have a next.js React app that needs to load a set of parameters when it starts. These are basic items such as server addresses. I would like for the user to be able to enter a single word or phrase when docker runs the app and then have the app set those parameters based ..
I cannot seem to get my node:alpine Docker image for a react/next.js to build. I can get it to build fine locally, but I never see the traffic in my API logs when the Docker build reaches out to the NEXT_PUBLIC_API_URL URL, which is itself running in a Docker container (nginx, headless craft cms, etc.). ..
I am new to docker and trying to learn it by it’s documentation. AS i need to create a NextJS build using docker image for nginx server i have followed the below process. Install the nginx Seeding the port 80 to 3000 in the default config. Symlink the out directory to base nginx directory CMD ..
I am trying to create a docker image but I am getting this error(Couldn’t find a pages directory. Please create one under the project root) in the "npm run build" step. But I have that directory in my application root folder. In my local server it is running fine and creating .next folder. My folder ..
I have a Kubernetes cluster on Digitalocean where www.example.com points to my Next.js application. This works as expected, however it serves all the assets from that same pod where my Next.js is running: https://www.example.com/_next/static/chunks/webpack-16e102404d6e7c36f3ae.js https://www.example.com/_next/static/chunks/framework-852c1b21255b4351ab3d.js and so on. Now I would like to serve these static files from a CDN instead, so I started researching ..
I’m trying to send a request in my getStaticProps function to my backend api from another docker container. but even though the api url is written correctly, the static page still is not created. because for the static page to be built the backend should be up already, and because it is build-time the other ..
I’m trying to send a simple GET request from my Next.js getStaticProps function to another container which is a node backend api using docker-compose. This is my docker-compose file: version: "3" services: web: build: ./backend volumes: – ./backend:/home/node/app/ ports: – "3001:3001" frontend: build: ./frontend volumes: – ./frontend:/home/node/app/ ports: – "3000:3000" depends_on: – "web" Index.js in ..
Looking to get NextJS working with a separate express backend on Elastic Beanstalk. I’ve got everything dockerized with an NGINX reverse proxy. Locally, everything works when using getServerSideProps, but the same request returns a 500 when deployed. Client side requests work as expected. I’ve tried various updates to the config, different urls, and could only ..