Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#57 updated comments related to oauth2 #94

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .env.docker.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -24,4 +26,4 @@ AWS_STORAGE_BUCKET_NAME=
# RabbitMQ Connection Settings
AMQP_HOST=rabbitmq
AMQP_USER=guest
AMQP_PASSWORD=guest
AMQP_PASSWORD=guest
23 changes: 3 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand All @@ -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.
Expand Down Expand Up @@ -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=<insert if using s3 bucket>
AWS_SECRET_ACCESS_KEY=<insert if using s3 bucket>
SECRET_KEY=BLAH
DATABASE_URL=postgres://<insertDBUSERNAME>:<insertDBUSERPASSWORD>@127.0.0.1:5432/<insertDBNAME>
AMQP_HOST=<insert>
AMQP_USER=<insert>
AMQP_PASSWORD=<insert>
```
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.

Expand Down
16 changes: 9 additions & 7 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@

# 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
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
Expand Down