Category : next.js

I have a nextjs app that is dependent on a hasura self hosted instance. both needs to be run as a docker container. I was able to make hasura up and running. when i build nextjs manually. it works. I am able to render data from hasure. when i try to build from a docker ..

Read more

I am trying to build a container with symlink to a volume on my host (Ubuntu 20.04 on WSL2) This is the Dockerfile: FROM node:alpine RUN mkdir -p /var/www/html/nextjs ENV PORT 3000 WORKDIR /var/www/html/nextjs COPY package.json /var/www/html/nextjs COPY package-lock.json /var/www/html/nextjs COPY . /var/www/html/nextjs RUN npm install RUN npm run dev EXPOSE 3000 EXPOSE 49153 ENTRYPOINT ..

Read more

I have a project, where frontend and backend are separated. I’ve managed to connect those apps via docker network. But now I’m stuck with error from frontend app FetchError: request to http://nginx:80/Api/Pages/GetHeaderMenuElements/ failed, reason: getaddrinfo EAI_AGAIN nginx docker-compose.yml for frontend: version: ‘3.5’ services: next: container_name: ${APP_NAME:?err}-next #restart: ‘always’ #ports: # – "41000:4000" build: context: . ..

Read more

I am using WSL2 + Ubuntu 20.04 as the host. I saw these posts from Stack Overflow, but trying the fixes there didn’t work either: Why NextJS using Docker container did not reload after changed code for dev environment? And Hot reload stopped working after adjusting environment for work requirements And this This is my ..

Read more

I have a node.js application that’s been Dockerized with gcr.io/google-appengine/nodejs and deploys and runs fine. Knowing that by default GAE will run the "start" script in the package.json I simply replaced what was already there with next start -p 8080 which runs no problem. I’d like to trigger an alternative script rather than "start" and ..

Read more

I’m getting 400 Bad Request on nginx when trying to integrate multi-container app which consist of react front end and nodejs backend Dockerfile for frontend FROM node:alpine as builder WORKDIR ‘/app’ COPY ./package.json ./ COPY ./package-lock.json ./ COPY yarn.lock ./ COPY ./*.js ./ RUN npm install COPY . . RUN npm run build FROM nginx ..

Read more