forked from CodysseyLionMeeting/furniture-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 1.3 KB
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.3 KB
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
37
38
39
40
41
42
43
44
services:
postgres:
image: postgres:15-alpine
container_name: furniture-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-furniture}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-furniture123}
POSTGRES_DB: ${POSTGRES_DB:-furniture_db}
ports:
- "${POSTGRES_PORT:-5433}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/scripts/init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-furniture} -d ${POSTGRES_DB:-furniture_db}"]
interval: 10s
timeout: 5s
retries: 5
# Optional: pgAdmin for database management
pgadmin:
image: dpage/pgadmin4:latest
container_name: furniture-pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@furniture.local}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin123}
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "${PGADMIN_PORT:-5050}:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
postgres:
condition: service_healthy
profiles:
- tools # Only start with: docker compose --profile tools up
volumes:
postgres_data:
driver: local
pgadmin_data:
driver: local