Question and answer (Q&A) site https://q-a-site.herokuapp.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
609 B

version: '3'
services:
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_DB: qa_db
POSTGRES_USER: qa_username
POSTGRES_PASSWORD: qa_password
PGDATA: /var/lib/postgresql/data
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- postgres
restart: always
web:
build: .
environment:
PORT: 8080
JDBC_DATABASE_URL: jdbc:postgresql://${DOCKER_IP:-localhost}:5432/qa_db
ports:
- 8080:8080
networks:
postgres:
driver: bridge
volumes:
postgres: