Merge branch 'main' of ssh://git.eigen.co.id:2222/eigen/pos-realtime-report
continuous-integration/drone/tag Build is passing Details

main 1.0.0-production.4
Firman Ramdhani 2024-10-04 11:27:46 +07:00
commit 51130437d7
3 changed files with 9 additions and 26 deletions

View File

@ -1,4 +1,4 @@
FROM node:20-alpine as build
FROM node:18-alpine as build
ARG env_target
ARG release_version
@ -13,13 +13,8 @@ RUN echo -e "\n" >> /app/.env
RUN echo -e "APP_VERSION=${release_version}" >> /app/.env
RUN npm install
RUN npm run build
FROM nginx:1.16.0-alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
FROM caddy:2.6.1-alpine
COPY caddy/Caddyfile /etc/caddy/Caddyfile
COPY --from=build /app/dist /srv

5
caddy/Caddyfile Normal file
View File

@ -0,0 +1,5 @@
:80 {
root * /srv
try_files {path} /index.html
file_server
}

View File

@ -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;
}
}