Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #35 from glasnt/topic/django31
Browse files Browse the repository at this point in the history
Django 3.1, and docs updates
  • Loading branch information
glasnt committed Aug 6, 2020
2 parents 61e0b77 + 525e284 commit 892efa8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

Unicodex is a demo database-backed serverless Django application, that uses:

* [Django 3.0](https://docs.djangoproject.com/en/3.0/) as the web framework,
* [Django 3.1](https://docs.djangoproject.com/en/3.1/) as the web framework,
* [Google Cloud Run](https://cloud.google.com/run/) as the hosting platform,
* [Google Cloud SQL](https://cloud.google.com/sql/) as the managed database (via [django-environ](https://django-environ.readthedocs.io/en/latest/)),
* [Google Cloud Storage](https://cloud.google.com/storage/) as the media storage platform (via [django-storages](https://django-storages.readthedocs.io/en/latest/)),
Expand Down
8 changes: 6 additions & 2 deletions docs/80-automation.md
Expand Up @@ -21,6 +21,10 @@ To start with, you'll need to [install Terraform](https://learn.hashicorp.com/te
Once that's setup, you'll need to create a [new service account](https://www.terraform.io/docs/providers/google/getting_started.html#adding-credentials) that has Owner rights to your project, and [export an authentication key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) to that service account that Terraform can use.

```shell,exclude
# Setup gcloud for your project
export PROJECT_ID=YourProjectID
gcloud config set project $PROJECT_ID
# Create the service account
gcloud iam service-accounts create terraform \
--display-name "Terraform Service Account"
Expand Down Expand Up @@ -88,7 +92,7 @@ cd django-demo-app-unicodex/terraform
💡 If you chose to run this section in a new project, you will need to re-create the base image:

```shell,exclude
gcloud builds submit --tag gcr.io/MyNewProject/unicodex .
gcloud builds submit --tag gcr.io/${PROJECT_ID}/unicodex .
```

Once you have this configured, you need to initialise Terrafrom:
Expand All @@ -112,7 +116,7 @@ You can specify your variables using [command-line flags](https://learn.hashicor
terraform apply \
-var 'region=us-central1' \
-var 'service=unicodex' \
-var 'project=MyProject' \
-var 'project=${PROJECT_ID}' \
-var 'instance_name=psql'
```

Expand Down
14 changes: 8 additions & 6 deletions requirements.txt
@@ -1,9 +1,11 @@
Django==3.0.7
django-environ
Django==3.1
gunicorn
pyyaml
bs4
requests
django-environ
psycopg2-binary
django-storages[google]
google-cloud-secret-manager==0.1.1
google-cloud-secret-manager==1.0.0

# required for internal functionality, not deployement related
requests
pyyaml
bs4

0 comments on commit 892efa8

Please sign in to comment.