We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a7067d commit 872fed8Copy full SHA for 872fed8
Dockerfile
@@ -0,0 +1,12 @@
1
+FROM node:16.18.0-alpine AS builder
2
+ADD . /app
3
+WORKDIR /app/
4
+RUN npm i && npm run build
5
+
6
+FROM nginx:alpine-slim
7
+LABEL maintainer="诺墨"
8
+WORKDIR /var/www/html
9
+COPY --from=builder /app/build /var/www/html
10
+COPY ./default.conf /etc/nginx/conf.d/default.conf
11
12
+EXPOSE 80
default.conf
@@ -0,0 +1,14 @@
+server {
+ listen 80;
+ server_name 127.0.0.1;
+ root /var/www/html;
+ index index.html;
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+ location / {
+ try_files $uri $uri/ /index.html?$args;
13
+ }
14
+}
0 commit comments