weather-app/Dockerfile
Argiris Deligiannidis 25883a5362 Finalized codebase
2024-04-14 20:33:51 +03:00

29 lines
597 B
Docker

# Slim version of Node
FROM node:20-slim
# Set the working directory inside the container
WORKDIR /code
# Copy the application code to the working directory
COPY ./*.ts /code/
COPY ./*.json /code/
COPY ./assets /code/assets
COPY ./components /code/components
COPY ./pages /code/pages
COPY ./public /code/public
#Install Dependencies
RUN npm install --loglevel verbose
#Build app
RUN npx nuxi build
# Expose the port on which the application will run
EXPOSE 3000
#Environment Variable
ENV HOST 0.0.0.0
# Run the application using the built index.mjs
CMD ["node", ".output/server/index.mjs"]