-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.base.yml
162 lines (154 loc) · 3.87 KB
/
docker-compose.base.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Docker Compose (v2)
version: "2"
services:
web:
build:
context: docker/images/ci
args:
- BASE_IMAGE=${BASE_IMAGE}
- http_proxy=${HTTP_PROXY:-}
- https_proxy=${HTTP_PROXY:-}
- HTTP_PROXY=${HTTP_PROXY:-}
- HTTPS_PROXY=${HTTP_PROXY:-}
- NO_PROXY=hub,${NO_PROXY:-}
- no_proxy=hub,${NO_PROXY:-}
environment:
- http_proxy=${HTTP_PROXY:-}
- https_proxy=${HTTP_PROXY:-}
- HTTP_PROXY=${HTTP_PROXY:-}
- HTTPS_PROXY=${HTTP_PROXY:-}
- NO_PROXY=${NO_PROXY:-}
- no_proxy=${NO_PROXY:-}
- DB_TYPE=${DB_TYPE:-mysql}
- DB_PORT=${DB_PORT:-3306}
- DB_NAME=${DB_NAME:-wxt}
env_file: .env
depends_on:
db:
condition: service_healthy
ports:
- "9000"
container_name: ${DOCKER_NAME}_web
cli:
build:
context: docker/images/ci
args:
- BASE_IMAGE=${BASE_IMAGE}
entrypoint: ["/bin/sleep", "3650d"]
environment:
- http_proxy=${HTTP_PROXY:-}
- https_proxy=${HTTP_PROXY:-}
- HTTP_PROXY=${HTTP_PROXY:-}
- HTTPS_PROXY=${HTTP_PROXY:-}
- NO_PROXY=hub,${NO_PROXY:-}
- no_proxy=hub,${NO_PROXY:-}
- DB_TYPE=${DB_TYPE:-mysql}
- DB_PORT=${DB_PORT:-3306}
- DB_NAME=${DB_NAME:-wxt}
env_file: .env
depends_on:
web:
condition: service_started
container_name: ${DOCKER_NAME}_cli
nginx:
build:
context: docker/images/nginx
args:
- BASE_IMAGE=${BASE_IMAGE}
env_file: .env
depends_on:
web:
condition: service_started
restart: always
ports:
- "80:80"
container_name: ${DOCKER_NAME}_nginx
mysql:
image: "mysql:${DB_VERSION:-8.0}"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=${DB_NAME}
env_file: .env
volumes:
- db_data:/var/lib/mysql
- files_private_data:/var/www/files_private
ports:
- "3308:3306"
container_name: ${DOCKER_NAME}_db
command: mysqld --max_allowed_packet=32M
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 45s
interval: 10s
retries: 10
pgsql:
image: "postgres:${DB_VERSION:-12-alpine}"
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- PGDATA=/var/lib/postgresql/data/pgdata
env_file: .env
volumes:
- ./docker/conf/postgresql/load-extensions.sh:/docker-entrypoint-initdb.d/load-extensions.sh
- db_data:/var/lib/postgresql/data
- files_private_data:/var/www/files_private
ports:
- "5432:5432"
container_name: ${DOCKER_NAME}_db
command:
[
"-c",
"shared_buffers=512MB",
"-c",
"max_connections=200",
"-c",
"work_mem=2048MB",
"-c",
"effective_cache_size=512MB",
"-c",
"maintenance_work_mem=32MB",
"-c",
"min_wal_size=512MB",
"-c",
"max_wal_size=512MB",
"-c",
"wal_buffers=8048kB",
]
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
hub:
image: selenium/hub:4.1.4
env_file: .env
ports:
- "4444:4444"
depends_on:
db:
condition: service_healthy
web:
condition: service_started
container_name: ${DOCKER_NAME}_hub
platform: linux/amd64
firefox:
image: selenium/node-firefox:4.1.4
environment:
SE_EVENT_BUS_HOST: hub
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
env_file: .env
depends_on:
db:
condition: service_healthy
web:
condition: service_started
hub:
condition: service_started
container_name: ${DOCKER_NAME}_firefox
platform: linux/amd64
volumes:
db_data:
files_data:
files_private_data: