-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
36 lines (33 loc) · 1.03 KB
/
docker-compose.yml
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
services:
postgres: # postgres service
container_name: postgres-sql-bsn
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /var/lib/postgresql/data # where postgres data is stored
POSTGRES_DB: book_social_network # database name
volumes:
- postgres:/var/lib/postgresql/data # attach volume to store data
ports:
- 5432:5432 # postgres port
networks:
- spring-demo # attach to spring-demo network
restart: unless-stopped # restart policy
mail-dev: # maildev service for local mail server
container_name: mail-dev-bsn2
image: maildev/maildev
ports:
- 1080:1080
- 1025:1025
networks:
- spring-demo # attach to spring-demo network
restart: unless-stopped # restart policy
# networks allow containers to communicate with each other and external services
networks:
spring-demo:
driver: bridge
# volumes allow data to persist even after the container is stopped
volumes:
postgres:
driver: local