Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.1
1.4.2
31 changes: 19 additions & 12 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,30 @@ if [ -f "/var/www/html/bin/console" ]; then
fi
fi

# Install demo index.php if no application is mounted
# Install demo index.php if no application is mounted AND DEMO_MODE is enabled
if [ ! -f "/var/www/html/public/index.php" ]; then
log_info "No application detected. Installing demo landing page..."

if [ -f "/usr/local/share/php-api-stack/index.php" ]; then
cp /usr/local/share/php-api-stack/index.php /var/www/html/public/index.php
log_info "Demo landing page installed"
else
log_warning "Demo template not found, creating basic fallback"
cat > /var/www/html/public/index.php << 'EOF'
if [ "${DEMO_MODE}" = "true" ]; then
log_info "DEMO_MODE enabled. Installing demo landing page..."

# Create directory if it doesn't exist
mkdir -p /var/www/html/public

if [ -f "/usr/local/share/php-api-stack/index.php" ]; then
cp /usr/local/share/php-api-stack/index.php /var/www/html/public/index.php
log_info "Demo landing page installed"
else
log_warning "Demo template not found, creating basic fallback"
cat > /var/www/html/public/index.php << 'EOF'
<?php
phpinfo();
EOF
fi

chown nginx:nginx /var/www/html/public/index.php
chmod 644 /var/www/html/public/index.php
else
log_info "No application detected and DEMO_MODE not enabled - skipping demo installation"
fi

chown nginx:nginx /var/www/html/public/index.php
chmod 644 /var/www/html/public/index.php
else
log_info "Application detected at /var/www/html/public/index.php - skipping demo installation"
fi
Expand Down
4 changes: 1 addition & 3 deletions php/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.cache_limiter = nocache
session.cache_expire = 180
session.sid_length = 32
session.sid_bits_per_character = 6

; OPcache
opcache.enable = ${PHP_OPCACHE_ENABLE}
Expand Down Expand Up @@ -174,7 +172,7 @@ xdebug.output_dir = /tmp
xdebug.log = /var/log/php/xdebug.log

; Security
open_basedir = /var/www/html:/tmp:/usr/local/lib/php:/usr/share/php
open_basedir = "/var/www/html:/tmp:/usr/local/lib/php:/usr/share/php:/usr/local/bin:/composer:/root"
; disable_functions = exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
disable_functions = exec,passthru,shell_exec,system,popen,show_source

Expand Down