- mkdir of user/logs/{apache,system} was quoted (literal {apache,system} dir) and is no longer needed: the entrypoint creates logs itself
- drop the /var/log and /etc/httpd/logs bind mounts, which collided with the entrypoint (mv of /var/log/httpd: Device or resource busy, then 'unsafe entry' refusal to start)
- read credentials from /home/<user>/mysql_creds (where the entrypoint writes them), not /var/lib/mysql/creds
- -a N (and the default 83) now selects the image tag cac:phpNN instead of always pulling latest (latest is PHP 8.5); validated; CAC_IMAGE overrides for a locally built image
- wait for the container to be healthy (or fail with its logs) instead of sleep 160; WordPress download runs as the user and only into an empty web root
- instance_logs/instance_db_info use docker logs / the right creds path
- new flags -d (DOCROOT_SUBDIR) and -x (XDEBUG) and PUBLIC_HTTPS_PORT are passed through; they take effect with the image changes in the following commits
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
46 lines
1.0 KiB
Bash
46 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
alias_block=''
|
|
|
|
cat <<EOF > /etc/httpd/conf.d/$domain.conf
|
|
|
|
<Directory "/home/$user">
|
|
AllowOverride None
|
|
# Allow open access:
|
|
Require all granted
|
|
</Directory>
|
|
|
|
<Directory "/home/$user/public_html">
|
|
Options All MultiViews
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
<VirtualHost _default_:*>
|
|
ServerName "$domain"
|
|
$alias_block
|
|
DocumentRoot "/home/$user/public_html"
|
|
RewriteEngine on
|
|
RewriteCond %{SERVER_NAME} =$domain
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
</VirtualHost>
|
|
|
|
Listen 443 https
|
|
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
|
|
SSLSessionCache shmcb:/run/httpd/sslcache(512000)
|
|
SSLSessionCacheTimeout 300
|
|
SSLCryptoDevice builtin
|
|
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost _default_:443>
|
|
ServerName "$domain"
|
|
$alias_block
|
|
DocumentRoot "/home/$user/public_html"
|
|
|
|
|
|
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
|
|
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
|
|
</VirtualHost>
|
|
</IfModule>
|
|
|
|
EOF |