-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (44 loc) · 1.06 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
version: '3.3'
services:
# NGINX webservers with nginx-demo hello page
nginx1:
hostname: nginx1
build: nginx-hello
expose:
- "80"
nginx2:
hostname: nginx2
build: nginx-hello
ports:
- "80"
# Defining a third server with name nginx3
nginx3:
hostname: nginx3
build: nginx-hello
ports:
- "80"
# NGINX Plus Load Balancer
nginx-plus:
hostname: nginx-plus
build:
context: nginx-plus
dockerfile: Dockerfile_ubuntu
# Secret needed for debian build
# secrets:
# - nginx-crt
# - nginx-key
volumes:
- ./nginx-plus/etc/nginx:/etc/nginx
# Needed for debian build as certs are passed as secrets
# - ./nginx-plus/etc/ssl:/etc/ssl
ports:
- 8080:8080
- 80:80
- 443:443
restart: always
# Secret needed for debian build
# secrets:
# nginx-crt:
# file: ./nginx-plus/etc/ssl/nginx/nginx-repo.crt
# nginx-key:
# file: ./nginx-plus/etc/ssl/nginx/nginx-repo.key