Skip to content

Commit

Permalink
User internal Docker network to connect Hydra to dev DB
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeorge committed Feb 18, 2022
1 parent 02be2e6 commit 275df13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
OSM_CONSUMER_KEY=<osm-consumer-key>
OSM_CONSUMER_SECRET=<osm-consumer-secret>
DSN=postgres://postgres@host.docker.internal:5433/osm-teams?sslmode=disable
DSN=postgres://postgres@dev-db/osm-teams?sslmode=disable
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Create an `.env` file by copying `.env.sample` and replacing the values as neede
```bash
OSM_CONSUMER_KEY=<osm-teams-app>
OSM_CONSUMER_SECRET=<osm-teams-app-secret>
DSN=postgres://postgres@host.docker.internal:5433/osm-teams?sslmode=disable
DSN=postgres://postgres@dev-db/osm-teams?sslmode=disable
```

Start Hydra and PostgreSQL with Docker:
Expand Down
12 changes: 1 addition & 11 deletions compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
depends_on:
- hydra-migrate
restart: always
networks:
- intranet

hydra-migrate:
image: oryd/hydra:v1.9.2
Expand All @@ -34,8 +32,6 @@ services:
env_file:
.env
restart: on-failure
networks:
- intranet

dev-db:
platform: linux/amd64
Expand All @@ -48,9 +44,7 @@ services:
- POSTGRES_DB=osm-teams
- PGDATA=/opt/postgres/data
volumes:
- ./docker-data/dev-db:/opt/postgres/data
networks:
- intranet
- ./docker-data/dev-db:/opt/postgres/data

test-db:
platform: linux/amd64
Expand All @@ -64,8 +58,4 @@ services:
- PGDATA=/opt/postgres/data
volumes:
- ./docker-data/test-db:/opt/postgres/data
networks:
- intranet

networks:
intranet:

0 comments on commit 275df13

Please sign in to comment.