PostgreSQL via Docker Compose
version: '3'
services:
postgres:
image: postgres:13.1
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
- POSTGRES_USER=<postgres_user>
- POSTGRES_PASSWORD=<postgres_user_pass>
- APP_DB_USER=<app_user>
- APP_DB_PASS=<app_user_pass>
- APP_DB_NAME=<app_database_name>
volumes:
- ./db:/docker-entrypoint-initdb.d/
ports:
- 5432:5432
Last updated