I build my Nuxt3 Applcation with this command which generates everything in a Folder .output
:
npm run build
This is the DockerFile that I’m using to build the docker file:
FROM node:17-alpine3.14
ADD .output /webapp/.output
EXPOSE 3000
WORKDIR /webapp/.output
ENTRYPOINT ["node", "/webapp/.output/server/index.mjs"]
and docker-compose.yml
looks like this:
version: '3.3'
services:
app-web:
build: .
ports:
- 3000:3000
everything runs without any errors but I expected to see the application by entering the address http://localhost:3000
but nothing happens.
Any Help is highly appreciated.
4
Answers
here is the working version:
My approach:
Docker Compose (for development)
Docker (production)
This is the Dockerfile we use to run our nuxt3 setup!
You can find an example here: https://github.com/sidestream-tech/sidebase/blob/main/Dockerfile
This is the Dockerfile I have created.
Github Gist