I have a Java Spring Boot app which works with a Postgres database. I want to use Docker for both of them. I initially put just the Postgres in Docker, and I had a docker-
docker-
You can use this.
version: "2" services: sample_db-postgresql: image: postgres:9.5 ports: - 5432:5432 environment: - POSTGRES_PASSWORD=sample - POSTGRES_USER=sample - POSTGRES_DB=sample volumes: - sample_db:/var/lib/postgresql/data volumes: sample_db: