It's no use building a great application if you can't easily deploy it.
Because Opal is built on top of Django, we can take advantage of all the hard work that the open source community has put into making it easy to deploy Django applications.
Opal can be deployed on any modern web server, if you're new to deploying Django applications we'd recommend you try Apache and mod_wsgi first. In most cases it'll be the easiest deployment choice.
The Opal scaffold application comes with a
Procfile ready for Heroku deployment, and the
requirements.txt includes some dependencies that allow us to easily deploy to
(Other PaaS and cloud technologies are available, and Opal should deploy fairly easily to any of them!)
Deploying to Heroku
We then need to create a new heroku application, and set up our database:
heroku addons:create heroku-postgresql
Next, we need to push our application code to the Heroku server with git:
git push heroku master
Then we can run our migrations, load our lookuplists and create a user:
heroku run python manage.py migrate
heroku run python manage.py load_lookup_lists
heroku run python manage.py createsuperuser
We should now be able to log in to our deployed app - to open it in a browser: