Skip to content

Commit

Permalink
Update db setup of README.md
Browse files Browse the repository at this point in the history
Behaviour change in docker-library/postgres newest version.
See [docker-library/postgres issue(pycontw#681)](docker-library/postgres#681)
  • Loading branch information
alice6373 authored Apr 23, 2020
1 parent aa8d6dc commit 65f3ae8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ This repository serves the website of PyCon TW, Python Conference Taiwan. This p

#### Database - Docker (Optional)

Write database password in .env:

POSTGRES_PASSWORD=somepassword

Define .env location in docker-compose-dev.yml:

env_file:
- .env

Create and start the database for development:

docker-compose -f docker-compose-dev.yml up
Expand Down Expand Up @@ -66,6 +75,11 @@ Then edit the `SECRET_KEY` line in `local.env`, replacing `{{ secret_key }}` int

If you’re using a database for the first time, create a database named `pycontw2016` owned by the database user specified in the env file:

> Enter pycontw_db_1 container
```cmd
docker exec -it pycontw_db_1 su - postgres
```

```sql
# Replace "postgres" with your specified role.
create database pycontw2016 with owner = postgres;
Expand Down

0 comments on commit 65f3ae8

Please sign in to comment.