Commit 998755b3 authored by nanahira's avatar nanahira

add frontend

parent cae1d318
Pipeline #441 failed with stages
in 2 minutes and 17 seconds
FROM node:buster-slim as frontend
RUN apt update && apt -y install python3 build-essential git && rm -rf /var/lib/apt/lists/*
RUN git clone --depth=1 https://code.mycard.moe/pani/gateway-selector-web /gateway-selector-web
WORKDIR /gateway-selector-web
RUN npm ci && \
npm run build
FROM node:buster-slim
RUN apt update && apt -y install python3 build-essential ipset && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
......@@ -6,4 +13,6 @@ RUN npm ci
COPY . ./
RUN npm run build
COPY --from=frontend /gateway-selector-web/dist ./build/public
CMD ["npm", "run", "start"]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>express.static 托管静态资源</h1>
</body>
</html>
h1 {
color: red;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment