mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-12-25 00:19:19 +01:00
25 lines
613 B
YAML
25 lines
613 B
YAML
---
|
|
# (Optional) when using custom network
|
|
# networks:
|
|
# yournetwork:
|
|
# external: true
|
|
volumes:
|
|
postgres-data:
|
|
services:
|
|
postgres:
|
|
# (Recommended) replace "latest" with specific version
|
|
image: postgres:latest
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
# (Optional) when creating a new database
|
|
# - POSTGRES_DB=${POSTGRES_DB}
|
|
ports:
|
|
- 5432:5432
|
|
# (Optional) when using custom network
|
|
# networks:
|
|
# - yournetwork
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|