Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official rootless image (designed for unprivileged environments like HF)
|
| 2 |
+
FROM codeberg.org/forgejo/forgejo:9-rootless
|
| 3 |
+
|
| 4 |
+
# Hugging Face enforces UID 1000
|
| 5 |
+
USER 1000
|
| 6 |
+
|
| 7 |
+
# Tell Forgejo to use the mounted persistent volume for ALL data
|
| 8 |
+
# (database, repositories, config, and attachments)
|
| 9 |
+
ENV FORGEJO_WORK_DIR=/data
|
| 10 |
+
ENV GITEA_WORK_DIR=/data
|
| 11 |
+
|
| 12 |
+
# Bind to all interfaces so the Hugging Face proxy can route traffic
|
| 13 |
+
ENV FORGEJO__server__HTTP_ADDR=0.0.0.0
|
| 14 |
+
|
| 15 |
+
# Set the internal port. Make sure this matches the `app_port` in your README.md.
|
| 16 |
+
# (7860 is HF's default, but you can change both if desired)
|
| 17 |
+
ENV FORGEJO__server__HTTP_PORT=7860
|
| 18 |
+
EXPOSE 7860
|