ariansyahdedy commited on
Commit
d89e71d
·
1 Parent(s): 4f087de

Change port

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -6
  2. railway.json +2 -2
Dockerfile CHANGED
@@ -33,10 +33,9 @@ EXPOSE 8000
33
  # Define environment variable
34
  ENV PYTHONUNBUFFERED=1
35
 
36
- # Print the PORT environment variable to ensure it's set
37
- RUN echo $PORT
38
-
39
- # Run Hypercorn when the container launches
40
- CMD ["hypercorn", "app.main:app", "--bind", "0.0.0.0:$PORT"]
41
-
42
 
 
 
 
33
  # Define environment variable
34
  ENV PYTHONUNBUFFERED=1
35
 
36
+ # Copy the start script into the container
37
+ COPY start.sh /code/start.sh
38
+ RUN chmod +x /code/start.sh
 
 
 
39
 
40
+ # Use the start script as the entry point
41
+ CMD ["/code/start.sh"]
railway.json CHANGED
@@ -5,6 +5,6 @@
5
  "dockerfilePath": "./Dockerfile"
6
  },
7
  "deploy": {
8
- "startCommand": "hypercorn app.main:app --bind \"[::]:$PORT\""
9
  }
10
- }
 
5
  "dockerfilePath": "./Dockerfile"
6
  },
7
  "deploy": {
8
+ "startCommand": "/code/start.sh"
9
  }
10
+ }