Update Dockerfile
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -17,13 +17,18 @@ WORKDIR /app
|
|
| 17 |
RUN adduser -D -u 10001 appuser && chown appuser:appuser /app
|
| 18 |
|
| 19 |
COPY --from=builder --chown=appuser:appuser /out/creepurl ./creepurl
|
| 20 |
-
COPY --chown=appuser:appuser backend/database ./database
|
| 21 |
|
|
|
|
| 22 |
ENV PORT=7860
|
| 23 |
ENV DB_PATH=./creepurl.db
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
EXPOSE 7860
|
| 26 |
|
| 27 |
USER appuser
|
| 28 |
|
| 29 |
-
CMD ["./creepurl"]
|
|
|
|
| 17 |
RUN adduser -D -u 10001 appuser && chown appuser:appuser /app
|
| 18 |
|
| 19 |
COPY --from=builder --chown=appuser:appuser /out/creepurl ./creepurl
|
|
|
|
| 20 |
|
| 21 |
+
# HuggingFace Spaces requires port 7860
|
| 22 |
ENV PORT=7860
|
| 23 |
ENV DB_PATH=./creepurl.db
|
| 24 |
+
ENV ENVIRONMENT=production
|
| 25 |
+
# IMPORTANT: Set BASE_URL to your actual HF Space URL in the Space settings
|
| 26 |
+
# e.g. BASE_URL=https://dipan004-creepurl.hf.space
|
| 27 |
+
# This makes generated short links point to the right domain
|
| 28 |
+
ENV BASE_URL=https://dipan004-creepurl.hf.space
|
| 29 |
|
| 30 |
EXPOSE 7860
|
| 31 |
|
| 32 |
USER appuser
|
| 33 |
|
| 34 |
+
CMD ["./creepurl"]
|