ci: update try use caddy
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
parent
45178d1312
commit
c77059971c
13
Dockerfile
13
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM node:20-alpine as build
|
FROM node:18-alpine as build
|
||||||
|
|
||||||
ARG env_target
|
ARG env_target
|
||||||
ARG release_version
|
ARG release_version
|
||||||
|
@ -13,13 +13,8 @@ RUN echo -e "\n" >> /app/.env
|
||||||
RUN echo -e "APP_VERSION=${release_version}" >> /app/.env
|
RUN echo -e "APP_VERSION=${release_version}" >> /app/.env
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:1.16.0-alpine
|
FROM caddy:2.6.1-alpine
|
||||||
|
COPY caddy/Caddyfile /etc/caddy/Caddyfile
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /srv
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
:80 {
|
||||||
|
root * /srv
|
||||||
|
try_files {path} /index.html
|
||||||
|
file_server
|
||||||
|
}
|
|
@ -1,17 +0,0 @@
|
||||||
server {
|
|
||||||
|
|
||||||
listen 80;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
|
|
||||||
location = /50x.html {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue