File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
container_engine/django_tutorial Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11# Getting started with Django on Google Container Engine
22
33This repository is an example of how to run a [ Django] ( https://www.djangoproject.com/ )
4- app on Google Container Engine. It uses the [ Writing your first Django app] (https://docs.djangoproject.com/en/1
5- .9/intro/tutorial01/) Polls application as the example app to deploy. From here on out, we refer to this app as
6- the 'polls' application.
4+ app on Google Container Engine. It uses the
5+ [ Writing your first Django app] ( https://docs.djangoproject.com/en/1.11/intro/tutorial01/ )
6+ Polls application (parts 1 and 2) as the example app to deploy. From here on
7+ out, we refer to this app as the 'polls' application.
78
89
910# Tutorial
@@ -12,9 +13,9 @@ See our [Django on Container Engine](https://cloud.google.com/python/django/cont
1213
1314## Contributing changes
1415
15- * See [ CONTRIBUTING.md] ( CONTRIBUTING.md )
16+ * See [ CONTRIBUTING.md] ( https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/ CONTRIBUTING.md)
1617
1718
1819## Licensing
1920
20- * See [ LICENSE] ( LICENSE )
21+ * See [ LICENSE] ( https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/ LICENSE)
Original file line number Diff line number Diff line change 8080# [START dbconfig]
8181DATABASES = {
8282 'default' : {
83- 'ENGINE' : 'django.db.backends.mysql' ,
83+ # If you are using Cloud SQL for MySQL rather than PostgreSQL, set
84+ # 'ENGINE': 'django.db.backends.mysql' instead of the following.
85+ 'ENGINE' : 'django.db.backends.postgresql' ,
8486 'NAME' : 'polls' ,
8587 'USER' : os .getenv ('DATABASE_USER' ),
8688 'PASSWORD' : os .getenv ('DATABASE_PASSWORD' ),
8789 'HOST' : '127.0.0.1' ,
88- 'PORT' : '3306 ' ,
90+ 'PORT' : '5432 ' ,
8991 }
9092}
9193# [END dbconfig]
Original file line number Diff line number Diff line change 6464 - image : b.gcr.io/cloudsql-docker/gce-proxy:1.05
6565 name : cloudsql-proxy
6666 command : ["/cloud_sql_proxy", "--dir=/cloudsql",
67- " -instances=<your-cloudsql-connection-string>=tcp:3306 " ,
67+ " -instances=<your-cloudsql-connection-string>=tcp:5432 " ,
6868 " -credential_file=/secrets/cloudsql/credentials.json" ]
6969 volumeMounts :
7070 - name : cloudsql-oauth-credentials
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ Django==1.10.5
22mysqlclient == 1.3.10
33wheel == 0.29.0
44gunicorn == 19.6.0
5+ psycopg2 == 2.7.1
You can’t perform that action at this time.
0 commit comments