Skip to content

railwayapp-templates/django-volume

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title description tags
Django Volume Support
A Django Template with Volume Support for Railway
django
railway volumes
python

Deploy

Deploy on Railway

Django with Volume Support Example

This example template starts a Django server utilizing volume support on Railway for storing and serving assets.

✨ Features

  • Django
  • Railway Volumes
  • Python 3

💁‍♀️ How to use

  • Clone locally and install packages with pip using pip install -r requirements.txt
  • Run locally using python manage.py migrate && python manage.py collectstatic --noinput && gunicorn mysite.wsgi

📝 Troubleshooting

If you get the following error No such file or directory: '/app/media/directory/...' make sure your directory exists since your folder structure has to be build from scratch for production purpose on the persistent storage.

You can use something like this:

new_directory = os.path.join(settings.MEDIA_ROOT, 'directory')
if not os.path.exists(new_directory):
  os.makedirs(new_directory)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published