Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose for postgres #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
14 changes: 13 additions & 1 deletion database/postgresql/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Postgres Course Setup

## Docker Postgres Setup
## Docker Postgres Setup (using just docker)

Create Docker container with Postgres database:

Expand All @@ -14,6 +14,18 @@ Stop container:

docker stop postgres-demo

## Docker Postgres Setup (using docker-compose)

Navigate to directory containing docker-compose.yml

Create and start container:

docker-compose up -d

Stop container:

docker-compose down

Connection Info:

JDBC URL: `jdbc:postgresql://localhost:5432/conference_app`
Expand Down
9 changes: 9 additions & 0 deletions database/postgresql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.7"
services:
postgres-demo:
image: postgres:11.5-alpine
container_name: postgres-demo
environment:
- POSTGRES_PASSWORD=Welcome
ports:
- 5432:5432