nikostolz
nikostolz
RRailway
Created by nikostolz on 8/24/2023 in #✋|help
Django Deployment Issue - 503 Error on Railway Platform
Hello, I am encountering a 503 error ("Application failed to respond") while deploying my Django application on Railway. Build and deploy logs contain no errors. Here are the relevant details: Deployment Logs:
Watching for file changes with StatReloader
Performing system checks...
Django version 4.1.7, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Watching for file changes with StatReloader
Performing system checks...
Django version 4.1.7, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Build Logs (Partial):
Pushing [==============================> ] 8.558MB/14.14MB 9ad7500d568a
...
Pushed 9ad7500d568a
Pushing [==================================================>] 56.56MB 6738ac10cb3e
Pushing [==================================================>] 58.7MB 6738ac10cb3e
...
Pushing [==============================> ] 8.558MB/14.14MB 9ad7500d568a
...
Pushed 9ad7500d568a
Pushing [==================================================>] 56.56MB 6738ac10cb3e
Pushing [==================================================>] 58.7MB 6738ac10cb3e
...
Deployment Setup: Docker configuration: https://github.com/NikGor/mysite/blob/main/Dockerfile and https://github.com/NikGor/mysite/blob/main/docker-compose.yml Deployment files: https://github.com/NikGor/mysite/blob/main/railway.yml Project settings: https://github.com/NikGor/mysite/blob/main/mysite/settings.py Observations: The application deploys successfully locally without any errors. Connection to the DATABASE_URL from Railway works from the local environment. All required environment variables such as DATABASE_URL, SECRET_KEY, DEBUG, ALLOWED_HOSTS for the Django application are properly configured on the Railway platform. I am seeking assistance from Django specialists to identify potential issues causing the application to not respond on Railway. I'm confused, because the project was successfully deployed on render.com. Note: I acknowledge that I am using the development server in the Dockerfile, which is suitable for small projects. For reference, I based my docker-compose.yml and Dockerfile on the official Django documentation's recommended sample project: https://github.com/dockersamples/link-shortener-django/ Thank you for your expertise and support. Best regards, Niko
9 replies