mirror of
https://github.com/mivodev/mivo.git
synced 2026-01-26 13:31:56 +07:00
fix: docker permissions & bump v1.2.2
This commit is contained in:
25
docker/entrypoint.sh
Normal file
25
docker/entrypoint.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Ensure Database directory exists
|
||||
mkdir -p /var/www/html/app/Database
|
||||
|
||||
# Fix permissions for the Database directory
|
||||
# This is crucial for SQLite when volumes are mounted from host
|
||||
if [ -d "/var/www/html/app/Database" ]; then
|
||||
chown -R www-data:www-data /var/www/html/app/Database
|
||||
chmod -R 775 /var/www/html/app/Database
|
||||
fi
|
||||
|
||||
# Also ensure .env is writable if it exists, or create it from example
|
||||
if [ ! -f "/var/www/html/.env" ] && [ -f "/var/www/html/.env.example" ]; then
|
||||
cp /var/www/html/.env.example /var/www/html/.env
|
||||
chown www-data:www-data /var/www/html/.env
|
||||
fi
|
||||
|
||||
if [ -f "/var/www/html/.env" ]; then
|
||||
chmod 664 /var/www/html/.env
|
||||
fi
|
||||
|
||||
# Execute the command passed to docker run (usually supervisor)
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user