File size: 1,206 Bytes
e6b618a
d03b2df
 
e6b618a
d03b2df
548f8ba
 
 
d03b2df
548f8ba
 
 
 
 
 
 
 
 
 
 
 
 
d03b2df
548f8ba
 
054055e
548f8ba
 
 
 
 
d03b2df
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
29
30
31
32
FROM gitea/gitea:latest-rootless

# Hugging Face enforces UID 1000
USER 1000

# 1. Setup the directory for custom assets
# In the rootless image, the custom folder is at /var/lib/gitea/custom
RUN mkdir -p /var/lib/gitea/custom/public/assets/css

# 2. Download the high-fidelity GitHub themes (Light and Dark)
RUN wget https://raw.githubusercontent.com/DesignPattern/gitea-github-theme/master/theme-github.css \
    -O /var/lib/gitea/custom/public/assets/css/theme-github.css && \
    wget https://raw.githubusercontent.com/DesignPattern/gitea-github-theme/master/theme-github-dark.css \
    -O /var/lib/gitea/custom/public/assets/css/theme-github-dark.css

# 3. Configure Gitea to recognize and default to the GitHub theme
ENV GITEA__ui__THEMES=gitea,github,github-dark
ENV GITEA__ui__DEFAULT_THEME=github

# 4. Critical UI fixes for the "Clone" feel
ENV GITEA__ui__USE_SERVICE_WORKER=true
ENV GITEA__ui__SHOW_USER_EMAIL=false

# 5. Hugging Face Network Config
ENV GITEA__server__HTTP_ADDR=0.0.0.0
ENV GITEA__server__HTTP_PORT=7860
ENV GITEA_WORK_DIR=/data

# Replace this with your actual Space URL to fix icon/font loading
ENV GITEA__server__ROOT_URL=https://abc1181-gitea-instance.hf.space/

EXPOSE 7860