File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 14
14
15
15
FROM nginx:1.27.5-alpine
16
16
17
+ # Set the default output directory for templating
18
+ ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
19
+
17
20
# Copy custom Nginx configuration
18
- COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf
21
+ COPY --chown=nginx:nginx nginx.conf /etc/nginx/templates/ nginx.conf.template
19
22
20
23
# Copy built Docusaurus site from the buid folder
21
24
COPY --chown=nginx:nginx build /usr/share/nginx/html
22
25
23
- # Nginx listens on 8080, expose it (for documentation/clarity)
24
- EXPOSE 8080
25
-
26
26
# Start Nginx in the foreground
27
27
CMD [ "nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 72
72
# ========= Server Block =========
73
73
server {
74
74
# Listen on the port specified by Cloud Run ($PORT), default is 8080
75
- listen 8080 default_server ;
76
- listen [::]:8080 default_server ;
75
+ listen ${PORT} default_server ;
76
+ listen [::]:${PORT} default_server ;
77
77
78
78
# https://stackoverflow.com/questions/62648644/hosting-docusaurus-v2-using-nginx
79
79
# prevent docusaurus to create a redirect to Cloud Run Endpoint or port 8080
You can’t perform that action at this time.
0 commit comments