File size: 519 Bytes
979853c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  postgres:
    image: gzdaniel/postgres-for-rag:16.6
    command: ["sh", "-c", "service postgresql start && sleep infinity"]
    # ports:
    #   - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql
    healthcheck:
      test:
        - CMD-SHELL
        - 'PORT_HEX="$(printf ''%04X'' 5432)"; cat /proc/net/tcp /proc/net/tcp6 2>/dev/null | grep -q ":$${PORT_HEX} "'
      interval: 5s
      timeout: 3s
      retries: 20
      start_period: 10s
    stop_grace_period: 30s
    restart: unless-stopped