Dockerfile and nginx.conf for api/blog

This commit is contained in:
2025-11-05 21:10:23 +05:30
parent 87300c17b0
commit 689abe30ac
2 changed files with 7 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf
# ./mongo-ops/site/
COPY ./_index /usr/share/nginx/html/
COPY ./mongo-ops/site /usr/share/nginx/html/mongo-ops/
COPY ./blog-api/site /usr/share/nginx/html/api/blog/
# Expose HTTP port
EXPOSE 80

View File

@@ -14,6 +14,12 @@ server {
index index.html;
}
# Explicit location for /mongo-ops/
location /api/blog/ {
root /usr/share/nginx/html;
index index.html;
}
# Optional: serve static assets (CSS, JS, images)
location / {
try_files $uri $uri/ /index.html;