forked from ryuichi1208/poc-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
131 lines (120 loc) · 2.87 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Licensed to this repo under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership. this repo licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may not use this
# file except in compliance with the License.
---
version: "3.7"
x-web-template: &template
domainname: poc.example.com
user: root
build:
context: ./webapp
dockerfile: Dockerfile
dns:
- 8.8.8.8
- 9.9.9.9
tty: true
environment:
TZ: "Asia/Tokyo"
logging:
driver: "json-file"
stop_signal: SIGSTOP
x-web-volumes: &volumes
volumes:
- type: bind
source: ./webapp/main.py
target: /var/www/main.py
- type: bind
source: ./webapp/templates
target: /var/www/templates
- type: bind
source: ./webapp/static
target: /var/www/static
services:
poc:
hostname: poc
container_name: poc
build:
context: ./poc
dockerfile: Dockerfile
tty: true
volumes:
- type: bind
source: ./poc/request_test.sh
target: /request_test.sh
extra_hosts:
- "ib.dev.com:192.168.2.100"
offload:
hostname: nginx.dev.com
container_name: nginx.dev.com
build:
context: ./nginx
dockerfile: Dockerfile
volumes:
- type: bind
source: ./nginx/config/nginx.conf
target: /etc/nginx/nginx.conf
- type: bind
source: ./nginx/config/ssl_offload.nginxconf
target: /etc/nginx/conf.d/default.conf
- type: bind
source: ./nginx/html
target: /usr/share/nginx/html
tty: true
sysctls:
net.core.somaxconn: 4
net.ipv4.ip_local_port_range: "65533 65535"
ports:
- 8080:80/tcp
- 8081:443/tcp
networks:
default:
ipv4_address: 192.168.2.100
redis:
hostname: redis001
container_name: redis001
image: redis:latest
ports:
- 6379:6379/tcp
command: redis-server --appendonly yes
gatling:
image: denvazh/gatling:3.2.1
container_name: gatling
stdin_open: true
tty: true
volumes:
- ./gatring/conf:/opt/gatling/conf
- ./gatring/user-files:/opt/gatling/user-files
- ./results:/opt/gatling/results
webapp001:
<<: *template
<<: *volumes
hostname: webapp001
container_name: webapp001
webapp002:
<<: *template
<<: *volumes
hostname: webapp002
container_name: webapp002
webapp003:
<<: *template
<<: *volumes
hostname: webapp003
container_name: webapp003
webapp004:
<<: *volumes
hostname: webapp004
container_name: webapp004
build:
context: ./webapp
dockerfile: Dockerfile-socket
# devices:
# - "/dev/ttyUSB0:/dev/ttyUSB0"
# devices:
# - "/dev/ttyUSB0:/dev/ttyUSB0"
networks:
default:
ipam:
config:
- subnet: 192.168.2.0/24