First commit
This commit is contained in:
15
docker/apache-vhost.conf
Normal file
15
docker/apache-vhost.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html/public
|
||||
|
||||
<Directory /var/www/html/public>
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
FallbackResource /index.php
|
||||
</Directory>
|
||||
|
||||
ErrorLog /proc/self/fd/2
|
||||
CustomLog /proc/self/fd/1 combined
|
||||
</VirtualHost>
|
||||
38
docker/entrypoint.sh
Normal file
38
docker/entrypoint.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
APP_ROOT="/var/www/html"
|
||||
CONFIG="$APP_ROOT/config.local.ini"
|
||||
|
||||
# Docker creates a directory when bind-mounting a file that doesn't exist on the host.
|
||||
# Remove it so bootstrap.php falls back to defaults.
|
||||
if [ -d "$CONFIG" ]; then
|
||||
rmdir "$CONFIG" 2>/dev/null || true
|
||||
echo "Warning: config.local.ini was mounted as a directory (file missing on host). Using defaults."
|
||||
fi
|
||||
|
||||
install -d -m 0775 -o www-data -g www-data \
|
||||
"$APP_ROOT/db" \
|
||||
"$APP_ROOT/logs" \
|
||||
"$APP_ROOT/public/uploads/media" \
|
||||
"$APP_ROOT/tmp" \
|
||||
"$APP_ROOT/tmp/cache" \
|
||||
"$APP_ROOT/tmp/uploads"
|
||||
|
||||
# Bind mounts may keep host-side ownership/permissions. Normalize the writable
|
||||
# application directories before boot so F3 can write its cache and SQLite files.
|
||||
chown -R www-data:www-data \
|
||||
"$APP_ROOT/db" \
|
||||
"$APP_ROOT/logs" \
|
||||
"$APP_ROOT/public/uploads/media" \
|
||||
"$APP_ROOT/tmp"
|
||||
chmod -R u+rwX,g+rwX \
|
||||
"$APP_ROOT/db" \
|
||||
"$APP_ROOT/logs" \
|
||||
"$APP_ROOT/public/uploads/media" \
|
||||
"$APP_ROOT/tmp"
|
||||
|
||||
# Run installation as the web user so generated files keep consistent ownership.
|
||||
su -s /bin/sh www-data -c "php $APP_ROOT/scripts/install.php"
|
||||
|
||||
exec "$@"
|
||||
12
docker/php-prod.ini
Normal file
12
docker/php-prod.ini
Normal file
@@ -0,0 +1,12 @@
|
||||
expose_php = Off
|
||||
log_errors = On
|
||||
display_errors = Off
|
||||
error_log = /var/www/html/logs/php-error.log
|
||||
session.use_strict_mode = 1
|
||||
|
||||
opcache.enable = 1
|
||||
opcache.enable_cli = 0
|
||||
opcache.validate_timestamps = 0
|
||||
opcache.memory_consumption = 128
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.max_accelerated_files = 10000
|
||||
Reference in New Issue
Block a user