-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (34 loc) · 920 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (34 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: better-stack-postgres
restart: unless-stopped
environment:
POSTGRES_DB: better-stack
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
# PostgreSQL Dashboard
pg-dashboard:
image: sosedoff/pgweb:latest
container_name: better-stack-pgweb
restart: unless-stopped
ports:
- '5050:8081'
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: 'postgres://postgres:postgres@postgres:5432/better-stack?sslmode=disable'
command: pgweb --bind=0.0.0.0 --listen=8081 --url=$DATABASE_URL
volumes:
postgres_data: