-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (28 loc) · 879 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (28 loc) · 879 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
services:
postgres:
image: postgres:latest
container_name: postgres
restart: no # Prevent auto-start
environment:
POSTGRES_USER: admin # Default username
POSTGRES_PASSWORD: password # Default password
POSTGRES_DB: my_database # Default database name
ports:
- 5432:5432 # Expose PostgreSQL on host's port 5432
networks:
- postgres-network
volumes:
- postgres-data:/var/lib/postgresql/data # Persist PostgreSQL data
adminer:
image: adminer:latest
container_name: adminer
restart: no # Prevent auto-start
ports:
- 8080:8080 # Expose Adminer on host's port 8080
networks:
- postgres-network
networks:
postgres-network:
driver: bridge # Custom bridge network for communication between services
volumes:
postgres-data: # Define a volume for PostgreSQL data