YoruAkio commited on
Commit
f26d3fa
Β·
1 Parent(s): ecdcf52

fix: update exposed port to 7860 and adjust environment variable in Dockerfile and index.js

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. 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 typically uses port 7860, but we'll use 3000 and map it)
28
- EXPOSE 3000
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=3000
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 || 3000;
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!');