Merge pull request #19 from sysuid/master

Add Dockerfile and docker-compose.yml
This commit is contained in:
奚玉帆 2024-06-07 13:19:31 +08:00 committed by GitHub
commit 5f51244edf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 0 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM node:22
WORKDIR /app
COPY yarn.lock package.json ./
RUN npm config set registry https://registry.npmmirror.com
RUN yarn config set registry https://registry.npmmirror.com
RUN yarn install
COPY . .
EXPOSE 5173
CMD ["yarn", "dev", "--host", "0.0.0.0"]

11
docker-compose.yml Normal file
View file

@ -0,0 +1,11 @@
version: "3.5"
services:
k5web:
build: .
container_name: k5web
network_mode: "bridge"
ports:
- "5173:5173"
environment:
- TZ=Asia/Shanghai
restart: always