Skip to content
Snippets Groups Projects
Commit 9553f9b9 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Add dockerfile and docker compose

parent 5b3bdc5f
No related branches found
No related tags found
No related merge requests found
**/node_modules
Dockerfile
.gitlab-ci.yaml
**/.nuxt
\ No newline at end of file
### Stage Install ###
FROM node:19.5-bullseye-slim as install
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package*.json ./
RUN npm install
### STAGE: Dev
FROM node:19.5-bullseye-slim as dev
WORKDIR /usr/src/app
COPY --from=install /usr/src/app ./
COPY . /usr/src/app
EXPOSE 3000 24678 4000
CMD ["npm", "run", "dev"]
### STAGE: Build ###
FROM node:19.5-bullseye-slim as build
WORKDIR /usr/src/app
COPY --from=install /usr/src/app ./
COPY . /usr/src/app
RUN npm run generate
### STAGE: NGINX ###
FROM nginx:stable-alpine
COPY --from=build /usr/src/app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
version: "3.9"
services:
nuxt:
build:
context: .
target: dev
container_name: docus_dev
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
- /usr/src/app/.nuxt
ports:
- "3000:3000"
- "24678:24678"
- "4000:4000"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment