fix: update exposed port to 7860 and adjust environment variable in Dockerfile and index.js
Browse files- Dockerfile +3 -3
- src/index.js +1 -1
Dockerfile
CHANGED
|
@@ -24,8 +24,8 @@ RUN mkdir -p /app/logs /app/temp && \
|
|
| 24 |
# Switch to non-root user
|
| 25 |
USER lumakit
|
| 26 |
|
| 27 |
-
# Expose port (Hugging Face Spaces
|
| 28 |
-
EXPOSE
|
| 29 |
|
| 30 |
# Health check
|
| 31 |
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
@@ -33,7 +33,7 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
| 33 |
|
| 34 |
# Set environment variables
|
| 35 |
ENV NODE_ENV=production
|
| 36 |
-
ENV PORT=
|
| 37 |
|
| 38 |
# Start the application
|
| 39 |
CMD ["bun", "run", "src/index.js"]
|
|
|
|
| 24 |
# Switch to non-root user
|
| 25 |
USER lumakit
|
| 26 |
|
| 27 |
+
# Expose port 7860 (Hugging Face Spaces standard port)
|
| 28 |
+
EXPOSE 7860
|
| 29 |
|
| 30 |
# Health check
|
| 31 |
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
|
|
| 33 |
|
| 34 |
# Set environment variables
|
| 35 |
ENV NODE_ENV=production
|
| 36 |
+
ENV PORT=7860
|
| 37 |
|
| 38 |
# Start the application
|
| 39 |
CMD ["bun", "run", "src/index.js"]
|
src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import express from 'express';
|
| 2 |
|
| 3 |
const app = express();
|
| 4 |
-
const PORT = process.env.PORT ||
|
| 5 |
|
| 6 |
app.get('/', (req, res) => {
|
| 7 |
res.send('Hello, This is LumaKit Backend!');
|
|
|
|
| 1 |
import express from 'express';
|
| 2 |
|
| 3 |
const app = express();
|
| 4 |
+
const PORT = process.env.PORT || 7860;
|
| 5 |
|
| 6 |
app.get('/', (req, res) => {
|
| 7 |
res.send('Hello, This is LumaKit Backend!');
|