feat: support docker image building

This commit is contained in:
AkagiYui 2023-08-28 01:05:14 +08:00
parent 79f08733df
commit b849014aab
2 changed files with 23 additions and 0 deletions

9
Caddyfile Normal file
View File

@ -0,0 +1,9 @@
{
admin off
}
:80 {
root * /www
file_server
try_files {path} /
}

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM node:18 as builder
COPY . /app
RUN npm config set registry https://registry.npmmirror.com \
&& npm config set disturl https://npmmirror.com/dist --location=global \
&& npm i --location=global pnpm
WORKDIR /app
RUN pnpm install \
&& pnpm build
FROM caddy:alpine
COPY Caddyfile /etc/caddy
COPY dist /www