-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (45 loc) · 1.18 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
37
38
39
40
41
42
43
44
45
46
47
48
49
version: "3.3"
services:
db:
container_name: spring-mejai-postgres
image: postgres:13.1-alpine
environment:
- POSTGRES_DB=spring-mejai-postgres
- POSTGRES_USER=compose-postgres
- POSTGRES_PASSWORD=compose-postgres
ports:
- "5432:5432"
volumes:
- postgres-mejai-data:/var/lib/postgresql/data
# 서비스 명
pgadmin:
# 사용할 이미지
image: dpage/pgadmin4
# 컨테이너 실행 시 재시작
restart: always
# 컨테이너명 설정
container_name: pgadmin4
# 접근 포트 설정 (컨테이너 외부:컨테이너 내부)
ports:
- "5050:80"
# 환경 변수 설정
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: password
depends_on:
- db
spring:
container_name: spring-boot
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://spring-db-postgres:5432/spring-mejai-postgres
SPRING_DATASOURCE_USERNAME: compose-postgres
SPRING_DATASOURCE_PASSWORD: compose-postgres
volumes:
postgres-mejai-data: