-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (35 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
35 lines (35 loc) · 1.09 KB
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
##nginx 이미지와 spring 이미지 생성함.
#
#version: "3"
#services:
# web:
# image: ubuntu/nginx # 존재하는 nginx 이미지 사용
# container_name: nginx # Nginx Container 이름 지정
# ports:
# - "80:80"
# volumes:
# - /etc/nginx:/etc/nginx # EC2 Nginx와 Docker Nginx Container 를 매핑
# spring1:
# build:
# context: .
# dockerfile : DockerFile # Dockerfile 실행
# image: spring # 내가 만든 이미지 이름을 지정
# container_name: real1 # 컨테이너 이름 지정
# ports:
# - 8081:8081
# volumes:
# - ./:/root/ # 요것은.. 필요 없을 수도 있는데 그 이유는 아래에서..
# environment:
# active: real1 # Dockerfile 실행될 때 환경변수를 사용할 수 있게 지정
# spring2:
# build:
# context: .
# dockerfile : DockerFile # Dockerfile 실행
# image: spring
# container_name: real2
# ports:
# - 8082:8082
# volumes:
# - ./:/root/
# environment:
# active: real2 # Dockerfile 실행될 때 환경변수를 사용할 수 있게 지정.