perbaikan docker
This commit is contained in:
parent
3fb2a522ea
commit
e8f8b5eb9d
@ -13,10 +13,9 @@ RUN npm run build
|
|||||||
# Gunakan NGINX untuk menyajikan SPA
|
# Gunakan NGINX untuk menyajikan SPA
|
||||||
FROM nginx:1.29.0-alpine-slim
|
FROM nginx:1.29.0-alpine-slim
|
||||||
|
|
||||||
# Salin hasil build ke folder root nginx
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
COPY --from=builder /app/.output/public /usr/share/nginx/html
|
|
||||||
|
|
||||||
# Salin konfigurasi khusus NGINX untuk SPA (opsional tapi direkomendasikan)
|
COPY --from=builder /app/.output/public /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@ -8,4 +8,6 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_page 404 /index.html;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user