#djangobluemix
Allows you to quickly start building and deploying Django Python Apps To IBM Bluemix.
##To manually push this starter Django App to Bluemix using CF
-
Create a Bluemix Account
Sign up on Bluemix.net, or use an existing account. Runtimes are free to try for one month.
-
Download and install the Cloud-foundry CLI tool
-
Edit the
manifest.yml
file and change the<application-name>
to something unique and modify the<services-name>
to reflect your own Postgres SQL database service instance on Bluemix after you create it.
applications:
- name: <application-name>
memory: 256M
# This is command provided by cf -c option
command: bash ./run.sh
buildpack: https://github.com/cloudfoundry/python-buildpack
path: .
declared-services:
<services-name>:
label:postgresql
plan:100
services:
- <services-name>
The name you use will determinate your application url initially, e.g. `<application-name>.mybluemix.net`.
- Connect to Bluemix in the command line tool
$ cf api https://api.ng.bluemix.net
$ cf login -u <your user ID>
- Create the PostGress Databse Service on in Bluemix
$ cf create-service postgresql "100" postgresqlmine
- Push it live!
$ cf push
Simply click on the deploy to bluemix button below to deploy this Django Python Application.
Directions
- Accept the default values for you the app location and name.
- The app will deploy however the initial application start will fail because you haven't created your postgress database service.
- The error messages in the DevOps pipeline services shows you haven't created your postgresql-qc database service.
- Create the postgress service. I used "postgresql-qc" as the name in the manifest file.
- Bind the service to your app in the blumix dashboard bluemix.net
- Restart your app in Bluemix
- Access the deployed app using the routesURL at the top of your app routesURL/admin
- Use admin for user id and password and start creating users.
- Enjoy
To troubleshoot your Bluemix app the main useful source of information are the logs, to see them, run:
$ cf logs <application-name> --recent
This sample code is licensed under Apache 2.0. Full license text is available in LICENSE.
See CONTRIBUTING.