Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求添加支持Docker部署 #3

Open
spysir opened this issue Sep 28, 2024 · 1 comment
Open

请求添加支持Docker部署 #3

spysir opened this issue Sep 28, 2024 · 1 comment

Comments

@spysir
Copy link

spysir commented Sep 28, 2024

请求添加支持Docker部署,谢谢

@wanghuangjie
Copy link

wanghuangjie commented Oct 3, 2024

mkdir drawstamp
cd drawstamp
git clone https://github.com/xxss0903/drawstamputils.git
nano Dockerfile

FROM node:20
WORKDIR /app
COPY ./drawstamputils/*.json ./
RUN npm install
COPY ./drawstamputils ./
CMD ["npm", "install"]

nano docker-compose.yaml

version: "2"
services:
  drawstamp:
    build: .
    working_dir: /app
    environment:
      - NODE_ENV=production
    volumes:
      - ./drawstamputils:/app
      - /app/node_modules       ###这里非常重要,不然会提示找不到vite

    ports:
      - "5173:5173"
    command: "npm run dev -- --host 0.0.0.0"

docker-compose up -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants