fix: docker permissions & bump v1.2.2

This commit is contained in:
dyzulk
2026-01-19 11:09:42 +07:00
parent 9cee55c05a
commit 51ca6d3669
4 changed files with 35 additions and 3 deletions

View File

@@ -29,8 +29,15 @@ RUN mkdir -p /var/www/html/app/Database && \
chown -R www-data:www-data /var/www/html && \ chown -R www-data:www-data /var/www/html && \
chmod -R 755 /var/www/html chmod -R 755 /var/www/html
# Copy Entrypoint
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Expose port # Expose port
EXPOSE 80 EXPOSE 80
# Start Supervisor (which starts Nginx & PHP-FPM) # Use Entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# Start Supervisor
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

View File

@@ -3,7 +3,7 @@ namespace App\Config;
class SiteConfig { class SiteConfig {
const APP_NAME = 'MIVO'; const APP_NAME = 'MIVO';
const APP_VERSION = 'v1.2.1'; const APP_VERSION = 'v1.2.2';
const APP_FULL_NAME = 'MIVO - Mikrotik Voucher'; const APP_FULL_NAME = 'MIVO - Mikrotik Voucher';
const CREDIT_NAME = 'MivoDev'; const CREDIT_NAME = 'MivoDev';
const CREDIT_URL = 'https://github.com/mivodev'; const CREDIT_URL = 'https://github.com/mivodev';

25
docker/entrypoint.sh Normal file
View 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 "$@"

View File

@@ -1,6 +1,6 @@
{ {
"name": "mivo", "name": "mivo",
"version": "1.2.1", "version": "1.2.2",
"description": "This is a complete rewrite of Mivo using a modern MVC architecture.\r It runs on a lightweight custom core designed for performance on low-end devices (STB/Android).", "description": "This is a complete rewrite of Mivo using a modern MVC architecture.\r It runs on a lightweight custom core designed for performance on low-end devices (STB/Android).",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {