gordon-posit commited on
Commit
67b70d9
·
1 Parent(s): c440086

Permission testing

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -2
Dockerfile CHANGED
@@ -18,7 +18,16 @@ RUN quarto render .
18
  # Use httpd:alpine as the final image to serve the site
19
  FROM httpd:alpine
20
 
21
- # Configure Apache to listen on port 8080
22
- RUN sed -i 's/Listen 80/Listen 7860/' /usr/local/apache2/conf/httpd.conf
 
 
 
 
 
 
 
 
 
23
  COPY --from=builder /app/_site/ /usr/local/apache2/htdocs/
24
  EXPOSE 7860
 
18
  # Use httpd:alpine as the final image to serve the site
19
  FROM httpd:alpine
20
 
21
+ # Create logs directory and ensure permissions (if you want to keep logs in files)
22
+ RUN mkdir -p /usr/local/apache2/logs/ && chown -R www-data:www-data /usr/local/apache2/logs/
23
+
24
+ # Alternatively, link logs to stdout and stderr
25
+ RUN ln -sf /dev/stdout /usr/local/apache2/logs/access.log \
26
+ && ln -sf /dev/stderr /usr/local/apache2/logs/error.log
27
+
28
+ # Configure Apache to listen on port 8080 and set ServerName to suppress FQDN warning
29
+ RUN sed -i 's/Listen 80/Listen 7860/' /usr/local/apache2/conf/httpd.conf \
30
+ && echo "ServerName localhost" >> /usr/local/apache2/conf/httpd.conf
31
+
32
  COPY --from=builder /app/_site/ /usr/local/apache2/htdocs/
33
  EXPOSE 7860