From 2d565eb159e36ea29c6f61dbd32c08644a34f6bf Mon Sep 17 00:00:00 2001 From: deechael Date: Thu, 19 Sep 2024 22:25:30 +0800 Subject: [PATCH] fix: docker --- Dockerfile | 19 +++---------------- docker-compose.yml | 4 ++-- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc2c37d..da2ec22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,9 @@ FROM node:18 -WORKDIR /run +WORKDIR /usr/app -COPY package*.json ./ -COPY components ./components -COPY styles ./styles -COPY app ./app -COPY config ./config -COPY types ./types -COPY public ./public -COPY next.config.js . -COPY tsconfig.json . -COPY postcss.config.js . -COPY tailwind.config.js . +COPY ./ /usr/app RUN npm install -RUN npm run build -RUN npm run start - -# CMD ["node", "index.js"] +CMD ["npm", "run", "start"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 432e371..9cfa36f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,10 @@ version: '3' services: - app: + web_build: build: . ports: - "17762:3000" volumes: - - ./run:/run + - ./run:/usr/app environment: - NODE_ENV=production \ No newline at end of file