Skip to content

Commit

Permalink
Merge pull request #501 from cr-ste-justine/feature/170-dockerized-ps…
Browse files Browse the repository at this point in the history
…ql-exec

Feature/170 dockerized psql exec
  • Loading branch information
rtisma authored Nov 11, 2019
2 parents e68a860 + 51de018 commit 14d6a98
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
PG_PASSWORD = "password"
PG_HOST = "localhost"
PG_PORT = 8082


start-db:
@docker-compose up -d --no-deps db
Expand All @@ -11,7 +15,10 @@ run-flyway-migration:
@cd song-server && mvn flyway:migrate -Dflyway.url=jdbc:postgresql://localhost:8082/song?stringtype=unspecified -Dflyway.user=postgres -Dflyway.password=password -Dflyway.locations=classpath:db/migration

login-psql:
@PGPASSWORD=password psql -h localhost -p 8082 -U postgres song
@PGPASSWORD=$(PG_PASSWORD) psql -h $(PG_HOST) -p $(PG_PORT) -U postgres song

containerized-login-psql:
@docker-compose exec -e "PGPASSWORD=$(PG_PASSWORD)" db psql -h $(PG_HOST) -p $(PG_PORT) -U postgres song

format:
@mvn fmt:format
Expand Down

0 comments on commit 14d6a98

Please sign in to comment.