Spaces:
Sleeping
Sleeping
| # Use official Nextcloud image as base | |
| FROM nextcloud:27-apache | |
| # Set working directory | |
| WORKDIR /var/www/html | |
| # Expose Hugging Face Spaces default port | |
| EXPOSE 7860 | |
| # Change Apache port to 7860 | |
| RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf && \ | |
| sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf | |
| # Optional: Enable recommended Apache modules | |
| RUN a2enmod rewrite headers env dir mime | |
| # ✅ Environment variables for auto-install (SQLite + admin user) | |
| ENV SQLITE_DATABASE=nextcloud.db \ | |
| NEXTCLOUD_TRUSTED_DOMAINS=hieeus1402-nextcloud.hf.space \ | |
| OVERWRITEHOST=hieeus1402-nextcloud.hf.space \ | |
| OVERWRITEPROTOCOL=https \ | |
| OVERWRITECLIURL=https://hieeus1402-nextcloud.hf.space \ | |
| NEXTCLOUD_DATA_DIR=/var/www/html/data \ | |
| TZ=Asia/Ho_Chi_Minh | |
| # CMD is already set in base image to start Apache | |