forgejo / Dockerfile
abc1181's picture
Used GitHub theme (#1)
548f8ba
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