-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (36 loc) · 921 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (36 loc) · 921 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
37
38
39
services:
postgres:
image: postgres:15-alpine
container_name: chat-app-postgres
restart: unless-stopped
environment:
POSTGRES_DB: chatapp
POSTGRES_USER: chatapp_user
POSTGRES_PASSWORD: chatapp_password
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "0.0.0.0:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
redis:
image: redis
ports:
- "6379:6379"
# Optional: pgAdmin for database management
# pgadmin:
# image: dpage/pgadmin4:latest
# container_name: chat-app-pgadmin
# restart: unless-stopped
# environment:
# PGADMIN_DEFAULT_EMAIL: admin@chatapp.com
# PGADMIN_DEFAULT_PASSWORD: admin123
# ports:
# - "8080:80"
# depends_on:
# - postgres
# networks:
# - chat-network
volumes:
postgres_data:
driver: local