File size: 537 Bytes
3e2fe96
 
 
 
 
 
 
 
 
 
 
 
 
2a944a5
3e2fe96
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# docker-compose.yml

version: "3.8"

services:
  postgres:
    image: postgres:15-alpine
    container_name: invoice_db
    environment:
      POSTGRES_USER: ${POSTGRES_USER:-user}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
      POSTGRES_DB: ${POSTGRES_DB:-invoices_db}
    ports:
      - "5433:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U user -d invoices_db"]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  postgres_data: