From 8bb37a94fcc6c07fb894b73e070aea961a574411 Mon Sep 17 00:00:00 2001 From: sysuid <22698877+sysuid@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:29:30 +0800 Subject: [PATCH 1/3] Create Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a620214 --- /dev/null +++ b/Dockerfile @@ -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"] From 9ead2a17ae81b7179cdcc5ef05b08bc3f1f32eac Mon Sep 17 00:00:00 2001 From: sysuid <22698877+sysuid@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:38:01 +0800 Subject: [PATCH 2/3] Create docker-compose.yml --- docker-compose.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a00567b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3.5" +services: + k5web: + build: . + container_name: k5web + ports: + - "5173:5173" + environment: + - TZ=Asia/Shanghai + restart: always From 8c752fcdee52971eb986629118917442ed88be6c Mon Sep 17 00:00:00 2001 From: sysuid <22698877+sysuid@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:49:14 +0800 Subject: [PATCH 3/3] Update docker-compose.yml add network_mode: "bridge" --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index a00567b..e99d4e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ services: k5web: build: . container_name: k5web + network_mode: "bridge" ports: - "5173:5173" environment: