Skip to content
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
63 changes: 36 additions & 27 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
version: '2'
services:
db:
image: postgres
web:
build: .
command: python3 manage.py runserver 0.0.0.0:8000
depends_on:
- db
- migration
env_file:
version: "2"
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: postgres
healthcheck:
test: "pg_isready -U postgres"
# Give the DB a few seconds to finish setup before we start checking
start_period: 5s
web:
build: .
command: python3 manage.py runserver 0.0.0.0:8000
depends_on:
db:
condition: service_healthy
migration:
condition: service_completed_successfully
env_file:
- web-variables.env
ports:
- "8000:8000"
volumes:
- .:/code
migration:
build: .
image: app
command: python manage.py migrate
env_file:
- web-variables.env
volumes:
- .:/code
links:
- db
depends_on:
- db
ports:
- "8000:8000"
volumes:
- .:/code
migration:
build: .
image: app
command: python manage.py migrate
env_file:
- web-variables.env
volumes:
- .:/code
links:
- db
depends_on:
db:
condition: service_healthy
6 changes: 3 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ to simplify setup of development environment. See
the [traditional setup section](#traditional-setup) if you don't wish to use
docker.

In `web-variables.env` fill out your credentials. See
[Credentials](#credentials) for instructions on generating.
Copy `web-variables.env.template` to `web-variables.env` and fill out your
credentials. See [Credentials](#credentials) for instructions on generating.

```bash
HS_PERSONAL_TOKEN=<token>
Expand Down Expand Up @@ -140,7 +140,7 @@ page, you'll need to give your user account superuser privileges:

### Credentials

Go to [your settings on recurse.com](https://www.recurse.com/settings/apps), make a new app. Name it something like "blaggregator-local" and the url should be http://localhost:8000/complete/hackerschool/ (WITH trailing slash). There you can get `SOCIAL_AUTH_HS_KEY` and `SOCIAL_AUTH_HS_SECRET`.
Go to [your settings on recurse.com](https://www.recurse.com/settings/apps), make a new app. Name it something like "blaggregator-local" and the url should be http://localhost:8000/complete/hackerschool/ (WITH trailing slash). There you can get `SOCIAL_AUTH_HS_KEY` (the generated app ID) and `SOCIAL_AUTH_HS_SECRET` (the generated secret).

Also create a personal access token and give it a name. This will generate the token to use for `HS_PERSONAL_TOKEN`.

Expand Down
File renamed without changes.