Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker compose For Spring Boot PostgreSQL
# USING LINKS
#version: "3.7"
#services:
# api_service:
# build: .
# restart: always
# ports:
# - 8080:8080
# links:
# - postgres_db:database
# postgres_db:
# image: "postgres:11.4"
# restart: always
# ports:
# - 5433:5432
# environment:
# POSTGRES_DB: java_to_dev_app_db
# POSTGRES_PASSWORD: nE5kMc7JCGNqwDQM
#USING DEPENDS ON
version: "3.7"
services:
api_service:
build: .
restart: always
ports:
- 8080:8080
depends_on:
- postgres_db
postgres_db:
image: "postgres:11.4"
restart: always
ports:
- 5433:5432
environment:
POSTGRES_DB: java_to_dev_app_db
POSTGRES_PASSWORD: nE5kMc7JCGNqwDQM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment