Skip to content

Commit

Permalink
fixed web <-> postgres connection inside docker
Browse files Browse the repository at this point in the history
  • Loading branch information
oen9 committed Apr 11, 2020
1 parent 881917a commit e957db1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ run `docker-compose up -d mongo postgres`
set `MONGO_URL_FULL_STACK_ZIO` env variable\
example: `MONGO_URL_FULL_STACK_ZIO=mongodb://test:test@localhost:27017/test`\
set `DATABASE_URL_FULL_STACK_ZIO` env variable\
example: `DATABASE_URL_FULL_STACK_ZIO="jdbc:postgresql://localhost:5432/fullstackzio?user=test&password=test"`\
example: `DATABASE_URL_FULL_STACK_ZIO="jdbc:postgresql://localhost:5432/fullstackzio?user=test&password=test"`

### js

Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- /etc/environment
environment:
MONGO_URL_FULL_STACK_ZIO: mongodb://root:secret@mongo:27017/admin
DATABASE_URL_FULL_STACK_ZIO: jdbc:postgresql://postgres:5432/fullstackzio?user=root&password=secret
JAVA_OPTS: "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,suspend=n,address=8000"
links:
- mongo
Expand Down Expand Up @@ -44,6 +45,8 @@ services:
depends_on:
- mongo

# docker-compose run postgres bash
# psql -h postgres -d fullstackzio -U root
postgres:
image: postgres:12.2
ports:
Expand Down

0 comments on commit e957db1

Please sign in to comment.