-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (32 loc) · 866 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
34 lines (32 loc) · 866 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
services:
postgres:
image: postgres:16-alpine
container_name: sql-masterclass-db
ports:
- "5439:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: masterclass
POSTGRES_DB: ecommerce
volumes:
- postgres_data:/var/lib/postgresql/data
- .:/app
- ./data:/app/data
# Mount the setup scripts to automatically run on initialization
- ./00-setup/create_tables_postgres.sql:/docker-entrypoint-initdb.d/01-create-tables.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d ecommerce"]
interval: 5s
timeout: 5s
retries: 5
adminer:
image: adminer:latest
container_name: sql-masterclass-adminer
ports:
- "8080:8080"
environment:
ADMINER_DEFAULT_SERVER: postgres
depends_on:
- postgres
volumes:
postgres_data: