1234567891011121314151617181920212223242526272829 |
- version: "3.7"
- networks:
- postgres-network:
- driver: bridge
- ipam:
- config:
- - subnet: ${POSTGRES_SUBNET}
- services:
- pg15:
- container_name: pg15
- build:
- context: ./postgres
- dockerfile: Dockerfile
- working_dir: /var/lib/postgres
- restart: unless-stopped
- ports:
- - "5432:5432"
- volumes:
- - ${POSTGRES_STORAGE_PATH}:/var/lib/postgresql/data
- - ${POSTGRES_LOG_PATH}:/var/log/postgresql
- networks:
- postgres-network:
- ipv4_address: ${POSTGRES_IP}
- environment:
- - POSTGRES_USER=postgres
- - POSTGRES_PASSWORD=postgres
|