File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed
Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,17 @@ COPY configs/apache2/httpd.conf /etc/apache2/httpd.conf
4242COPY configs/apache2/ssl.conf /etc/apache2/conf.d/ssl.conf
4343COPY configs/php/php.ini /etc/php8.2/php.ini
4444
45+ RUN chown apache:apache /etc/ssl/apache2/server.pem
46+ RUN chown apache:apache /etc/ssl/apache2/server.key
47+
4548RUN chown -R apache:apache /htdocs
4649RUN find /htdocs -type d -print0 | xargs -0 chmod 0755
4750RUN find /htdocs -type f -print0 | xargs -0 chmod 0644
4851
4952COPY --chmod=0755 docker-entrypoint.sh /usr/local/bin/
5053
54+ USER apache:apache
55+
5156HEALTHCHECK CMD curl -f http://localhost -A "HealthCheck" || exit 1
5257
5358# Set console entry path
Original file line number Diff line number Diff line change @@ -487,3 +487,9 @@ LogLevel ${LOG_LEVEL}
487487#
488488IncludeOptional /etc/apache2/conf.d/*.conf
489489AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json
490+
491+ #
492+ # The PidFile directive sets the file to which the server records the
493+ # process id of the daemon. If the filename is not absolute, then it
494+ # is assumed to be relative to the ServerRoot.
495+ PidFile /htdocs/httpd.pid
Original file line number Diff line number Diff line change @@ -17,11 +17,13 @@ services:
1717 ports :
1818 - ' 8080:80'
1919 - ' 8081:443'
20+ restart : unless-stopped
21+ user : apache:apache
22+ # read_only: true
2023 depends_on :
2124 - mysql
2225 links :
2326 - mysql
24- restart : unless-stopped
2527 mysql :
2628 image : mysql:8
2729 environment :
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ echo '+ ------------------------------------------------------------------ +'
3535# | -- MISC -- | #
3636# + ---------- + #
3737
38+ # Apache gets grumpy about PID files pre-existing
39+ rm -f /htdocs/httpd.pid
40+
3841echo ' | ------------------------------------------------------------------ |'
3942echo ' | Running Apache |'
4043echo ' + ------------------------------------------------------------------ +'
You can’t perform that action at this time.
0 commit comments