add postgres examples
This commit is contained in:
19
docker/docker-compose.yml
Normal file
19
docker/docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: appdb
|
||||
POSTGRES_USER: appuser
|
||||
POSTGRES_PASSWORD: changeme
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
volumes:
|
||||
pg_data:
|
||||
Reference in New Issue
Block a user