Dockerfile and nginx.conf for api/blog
This commit is contained in:
@@ -14,6 +14,7 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|||||||
# ./mongo-ops/site/
|
# ./mongo-ops/site/
|
||||||
COPY ./_index /usr/share/nginx/html/
|
COPY ./_index /usr/share/nginx/html/
|
||||||
COPY ./mongo-ops/site /usr/share/nginx/html/mongo-ops/
|
COPY ./mongo-ops/site /usr/share/nginx/html/mongo-ops/
|
||||||
|
COPY ./blog-api/site /usr/share/nginx/html/api/blog/
|
||||||
|
|
||||||
# Expose HTTP port
|
# Expose HTTP port
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ server {
|
|||||||
index index.html;
|
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)
|
# Optional: serve static assets (CSS, JS, images)
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
|
|||||||
Reference in New Issue
Block a user