From 19087dfde4685ff6eae768c8e5248cd1968812e4 Mon Sep 17 00:00:00 2001 From: Sasan Bahadaran Date: Tue, 23 May 2017 14:45:24 -0700 Subject: [PATCH] updated comments in .env.docker.sample and sample.env files to reflect where to go for instructions to create google oauth2 credentials and updated README.md --- .env.docker.sample | 12 +++++++----- README.md | 23 +++-------------------- sample.env | 16 +++++++++------- 3 files changed, 19 insertions(+), 32 deletions(-) diff --git a/.env.docker.sample b/.env.docker.sample index 0172b1c..f5cdbb3 100644 --- a/.env.docker.sample +++ b/.env.docker.sample @@ -2,8 +2,8 @@ # Django Runtime Settings DJANGO_SETTINGS_MODULE=trinket.settings.development -EMAIL_HOST_USER="" -EMAIL_HOST_PASSWORD="" +EMAIL_HOST_USER= +EMAIL_HOST_PASSWORD= SECRET_KEY=supersecretsquirrelsoup # Database Settings @@ -12,8 +12,10 @@ DATABASE_URL=postgres://postgres@postgres:5432/cultivar # Social Authentication Settings # These can be obtained from the Google Developer Console -GOOGLE_OAUTH2_CLIENT_ID="" -GOOGLE_OAUTH2_CLIENT_SECRET="" +# For instructions on how to obtain these, refer to +# https://python-social-auth.readthedocs.io/en/latest/backends/google.html#google-oauth2 +GOOGLE_OAUTH2_CLIENT_ID= +GOOGLE_OAUTH2_CLIENT_SECRET= # AWS Access Keys and Credentials # These can be obtained from the AWS console @@ -24,4 +26,4 @@ AWS_STORAGE_BUCKET_NAME= # RabbitMQ Connection Settings AMQP_HOST=rabbitmq AMQP_USER=guest -AMQP_PASSWORD=guest \ No newline at end of file +AMQP_PASSWORD=guest diff --git a/README.md b/README.md index fbd33f6..c1127d3 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Take your pick! Several development environments are supported right now. docker-compose -f dev.yml exec django python manage.py migrate docker-compose -f dev.yml exec django python manage.py createsuperuser ``` -6. It's a site at http://localhost:8001! +6. It's a site at http://localhost:8001 ! #### Need more details on the Docker installation? @@ -87,7 +87,7 @@ Extended Docker install documentation, tips, and troubleshooting is at [docs/doc 2. Install required services. Trinket relies on PostgreSQL for the database layer and so please ensure that a recent version is installed and running. If using a Mac, we recommend the excellent [PostgresApp](http://postgresapp.com/) -3. Create Postres database for local development, see [instructions](https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-14-04#create-a-database-and-database-user). +3. Create Postgres database for local development, see [instructions](https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-14-04#create-a-database-and-database-user). Note name of db, as well as username and password of db user you created. 4. (Optional) Create and install your python virtual environment. The bash commands below are provided as an example. @@ -121,24 +121,7 @@ test modules. 6. Create the needed environment variables in the `.env` file. `.env` files allow you to easily specify the environmental variables which Trinket requires for execution. Note that a sample/template has been provided with `sample.env`. - ``` - vim .env - ``` - -7. Update the contents of the `.env` file: - - ``` - DJANGO_SETTINGS_MODULE=trinket.settings.development - EMAIL_HOST_USER= - EMAIL_HOST_PASSWORD= - AWS_ACCESS_KEY_ID= - AWS_SECRET_ACCESS_KEY= - SECRET_KEY=BLAH - DATABASE_URL=postgres://:@127.0.0.1:5432/ - AMQP_HOST= - AMQP_USER= - AMQP_PASSWORD= - ``` +7. Update the contents of the `.env` file. 8. Run `python manage.py runserver` and go to http://localhost:8000. Optionally, you can use the Makefile by executing `make runserver` from the command line. diff --git a/sample.env b/sample.env index caa1eb2..f3e2d2c 100644 --- a/sample.env +++ b/sample.env @@ -4,8 +4,8 @@ # Django Runtime Settings DJANGO_SETTINGS_MODULE=trinket.settings.development -EMAIL_HOST_USER="" -EMAIL_HOST_PASSWORD="" +EMAIL_HOST_USER= +EMAIL_HOST_PASSWORD= SECRET_KEY=supersecretsquirrelsoup # Database Settings @@ -13,14 +13,16 @@ DATABASE_URL=postgres://cultivar:cultivar@localhost:5432/cultivar # Social Authentication Settings # These can be obtained from the Google Developer Console -GOOGLE_OAUTH2_CLIENT_ID="" -GOOGLE_OAUTH2_CLIENT_SECRET="" +# For instructions on how to obtain these, refer to +# https://python-social-auth.readthedocs.io/en/latest/backends/google.html#google-oauth2 +GOOGLE_OAUTH2_CLIENT_ID= +GOOGLE_OAUTH2_CLIENT_SECRET= # AWS Access Keys and Credentials # These can be obtained from the AWS console -AWS_ACCESS_KEY_ID="" -AWS_SECRET_ACCESS_KEY="" -AWS_STORAGE_BUCKET_NAME="" +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_STORAGE_BUCKET_NAME= # RabbitMQ Connection Settings AMQP_HOST=localhost