mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Update Docker config for Ubuntu 22.04
This commit is contained in:
parent
bb07a19147
commit
fa312ea089
3 changed files with 26 additions and 13 deletions
|
@ -1,18 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Generate SSL certificate if it doesn't exist
|
||||
if [ ! -f /standardebooks.org/web/config/ssl/standardebooks.test.crt ]; then
|
||||
openssl req -x509 -nodes -days 99999 -newkey rsa:4096 -subj "/CN=standardebooks.test" -keyout /standardebooks.org/web/config/ssl/standardebooks.test.key -sha256 -out /standardebooks.org/web/config/ssl/standardebooks.test.crt
|
||||
fi
|
||||
|
||||
# Install PHP dependencies
|
||||
cd /standardebooks.org/web
|
||||
composer install
|
||||
|
||||
# Create symlinks for web server configuration
|
||||
ln -s /standardebooks.org/web/config/apache/standardebooks.test.conf /etc/apache2/sites-available/
|
||||
ln -s /standardebooks.org/web/config/php/fpm/standardebooks.org.ini /etc/php/*/cli/conf.d/
|
||||
ln -s /standardebooks.org/web/config/php/fpm/standardebooks.org.ini /etc/php/*/fpm/conf.d/
|
||||
ln -s /standardebooks.org/web/config/php/fpm/standardebooks.test.ini /etc/php/*/cli/conf.d/
|
||||
ln -s /standardebooks.org/web/config/php/fpm/standardebooks.test.ini /etc/php/*/fpm/conf.d/
|
||||
ln -s /standardebooks.org/web/config/php/fpm/standardebooks.test.conf /etc/php/*/fpm/pool.d/
|
||||
|
||||
# Enable web server configuration
|
||||
a2ensite standardebooks.test
|
||||
service apache2 start
|
||||
|
||||
# Restart services to load new configuration
|
||||
service apache2 restart
|
||||
service php7.4-fpm restart
|
||||
|
||||
# Keep the server available by holding open the container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue