File size: 849 Bytes
df7bb5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389a325
 
 
143f118
 
df7bb5d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

# 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