mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-26 06:31:04 +01:00
20 lines
514 B
Plaintext
20 lines
514 B
Plaintext
|
|
||
|
database:
|
||
|
image: postgres:{{database_version}}-alpine
|
||
|
ports:
|
||
|
- "9432:5432"
|
||
|
environment:
|
||
|
- POSTGRES_PASSWORD={{database_password}}
|
||
|
- POSTGRES_USER={{database_username}}
|
||
|
- POSTGRES_DB={{database_databasename}}
|
||
|
restart: unless-stopped
|
||
|
healthcheck:
|
||
|
test: ["CMD-SHELL", "pg_isready -U {{database_username}}"]
|
||
|
interval: 10s
|
||
|
timeout: 5s
|
||
|
retries: 6
|
||
|
volumes:
|
||
|
- type: volume
|
||
|
source: database
|
||
|
target: /var/lib/postgresql/data
|