mirror of
https://github.com/Viren070/docker-compose-template.git
synced 2025-12-01 23:17:00 +01:00
27 lines
607 B
YAML
27 lines
607 B
YAML
services:
|
|
postgres:
|
|
image: postgres:17.2-alpine
|
|
container_name: postgres
|
|
restart: unless-stopped
|
|
shm_size: 2G
|
|
environment:
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: postgres
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data/pgdata
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- addon_network
|
|
|
|
networks:
|
|
addon_network:
|
|
external: true
|
|
|
|
volumes:
|
|
postgres-data: |