fix: docker

This commit is contained in:
deechael 2024-09-19 22:25:30 +08:00
parent ccd892a290
commit 2d565eb159
2 changed files with 5 additions and 18 deletions

View File

@ -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"]

View File

@ -1,10 +1,10 @@
version: '3'
services:
app:
web_build:
build: .
ports:
- "17762:3000"
volumes:
- ./run:/run
- ./run:/usr/app
environment:
- NODE_ENV=production