-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (36 loc) · 856 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (36 loc) · 856 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
40
version: '3.8'
services:
postgres:
image: postgres:15
container_name: saas-postgres
restart: unless-stopped
environment:
POSTGRES_DB: saas_backend
POSTGRES_USER: saas_user
POSTGRES_PASSWORD: saas_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- saas-network
# Optional: pgAdmin for database management
pgadmin:
image: dpage/pgadmin4:latest
container_name: saas-pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin_password
ports:
- "8080:80"
depends_on:
- postgres
networks:
- saas-network
volumes:
postgres_data:
networks:
saas-network:
driver: bridge