@@ -20,7 +20,7 @@ request a dedicated instance at contact@windmill.dev
20
20
21
21
:::
22
22
23
- ![ Integrattion between Selenium and Windmill] ( ./0-header.png " Connect Selenium with Windmill " )
23
+ ![ Integrattion between Selenium and Windmill] ( ./0-header.png ' Connect Selenium with Windmill ' )
24
24
25
25
## Prerequisite
26
26
@@ -46,7 +46,6 @@ It should look something like this:
46
46
version : ' 3.7'
47
47
48
48
services :
49
-
50
49
db :
51
50
image : postgres:14
52
51
restart : unless-stopped
@@ -59,7 +58,7 @@ services:
59
58
POSTGRES_PASSWORD : ${DB_PASSWORD}
60
59
POSTGRES_DB : windmill
61
60
healthcheck :
62
- test : [ " CMD-SHELL", " pg_isready -U postgres" ]
61
+ test : [' CMD-SHELL', ' pg_isready -U postgres' ]
63
62
interval : 10s
64
63
timeout : 5s
65
64
retries : 5
@@ -70,8 +69,8 @@ services:
70
69
replicas : 1
71
70
restart : unless-stopped
72
71
ports :
73
- - " 8000:8000"
74
- - " 9920-9930:9920-9930" # <- added this; only 10 ports are opened; if you want to open more ports increase the 2nd number respectively
72
+ - ' 8000:8000'
73
+ - ' 9920-9930:9920-9930' # <- added this; only 10 ports are opened; if you want to open more ports increase the 2nd number respectively
75
74
environment :
76
75
- DATABASE_URL=postgres://postgres:${DB_PASSWORD}@db/windmill?sslmode=disable
77
76
- BASE_URL=http://${WM_BASE_URL}
@@ -99,8 +98,9 @@ add the following:
99
98
100
99
` ` ` bash
101
100
DB_PASSWORD=changeme
101
+ #use your public base url here
102
102
WM_BASE_URL=http://localhost
103
- CADDY_REVERSE_PROXY=http://localhost
103
+ CADDY_REVERSE_PROXY=":80"
104
104
` ` `
105
105
106
106
This is the PostgreSQL database password used by Windmill and the base URL of
@@ -119,28 +119,28 @@ We will also use Docker to configue Selenoid.
119
119
120
120
` ` ` json
121
121
{
122
- "firefox": {
123
- "default": "104.0",
124
- "versions": {
125
- "104.0": {
126
- "image": "selenoid/firefox:104.0",
127
- "port": "4444",
128
- "path": "/wd/hub",
129
- "env": ["TZ=Europe/Berlin"]
130
- }
131
- }
132
- },
133
- "chrome": {
134
- "default": "104.0",
135
- "versions": {
136
- "104.0": {
137
- "image": "selenoid/chrome:104.0",
138
- "port": "4444",
139
- "path": "/",
140
- "env": ["TZ=Europe/Berlin"]
141
- }
142
- }
143
- }
122
+ "firefox": {
123
+ "default": "104.0",
124
+ "versions": {
125
+ "104.0": {
126
+ "image": "selenoid/firefox:104.0",
127
+ "port": "4444",
128
+ "path": "/wd/hub",
129
+ "env": ["TZ=Europe/Berlin"]
130
+ }
131
+ }
132
+ },
133
+ "chrome": {
134
+ "default": "104.0",
135
+ "versions": {
136
+ "104.0": {
137
+ "image": "selenoid/chrome:104.0",
138
+ "port": "4444",
139
+ "path": "/",
140
+ "env": ["TZ=Europe/Berlin"]
141
+ }
142
+ }
143
+ }
144
144
}
145
145
` ` `
146
146
@@ -168,29 +168,37 @@ add these two containers (`selenoid` and `selenoid-ui`). Don't forget to change
168
168
the path to your `config` directory path.
169
169
170
170
` ` ` yml
171
- selenoid:
172
- network_mode: bridge
173
- image: aerokube/selenoid:latest-release
174
- volumes:
175
- - "/path/to/config:/etc/selenoid" # <- change this
176
- - "/path/to/config/video:/opt/selenoid/video" # <- change this
177
- - "/path/to/config/logs:/opt/selenoid/logs" # <- change this
178
- - "/var/run/docker.sock:/var/run/docker.sock"
179
- environment:
180
- - OVERRIDE_VIDEO_OUTPUT_DIR=./config/video
181
- command: ["-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs"]
182
- ports:
183
- - "4444:4444"
184
-
185
- selenoid-ui:
186
- image: "aerokube/selenoid-ui"
187
- network_mode: bridge
188
- restart: always
189
- links:
190
- - selenoid
191
- ports:
192
- - "8080:8080"
193
- command: ["--selenoid-uri", "http://selenoid:4444"]
171
+ selenoid:
172
+ network_mode: bridge
173
+ image: aerokube/selenoid:latest-release
174
+ volumes:
175
+ - '/path/to/config:/etc/selenoid' # <- change this
176
+ - '/path/to/config/video:/opt/selenoid/video' # <- change this
177
+ - '/path/to/config/logs:/opt/selenoid/logs' # <- change this
178
+ - '/var/run/docker.sock:/var/run/docker.sock'
179
+ environment:
180
+ - OVERRIDE_VIDEO_OUTPUT_DIR=./config/video
181
+ command:
182
+ [
183
+ '-conf',
184
+ '/etc/selenoid/browsers.json',
185
+ '-video-output-dir',
186
+ '/opt/selenoid/video',
187
+ '-log-output-dir',
188
+ '/opt/selenoid/logs'
189
+ ]
190
+ ports:
191
+ - '4444:4444'
192
+
193
+ selenoid-ui:
194
+ image: 'aerokube/selenoid-ui'
195
+ network_mode: bridge
196
+ restart: always
197
+ links:
198
+ - selenoid
199
+ ports:
200
+ - '8080:8080'
201
+ command: ['--selenoid-uri', 'http://selenoid:4444']
194
202
` ` `
195
203
196
204
Your `docker-compose.yml` should look like something like this :
@@ -199,7 +207,6 @@ Your `docker-compose.yml` should look like something like this:
199
207
version: '3.7'
200
208
201
209
services:
202
-
203
210
db:
204
211
image: postgres:14
205
212
restart: unless-stopped
@@ -212,7 +219,7 @@ services:
212
219
POSTGRES_PASSWORD: ${DB_PASSWORD}
213
220
POSTGRES_DB: windmill
214
221
healthcheck:
215
- test: [ " CMD-SHELL", " pg_isready -U postgres" ]
222
+ test: [' CMD-SHELL', ' pg_isready -U postgres' ]
216
223
interval: 10s
217
224
timeout: 5s
218
225
retries: 5
@@ -223,8 +230,8 @@ services:
223
230
replicas: 1
224
231
restart: unless-stopped
225
232
ports:
226
- - " 8000:8000"
227
- - " 9920-9930:9920-9930" # <- added this; only 10 ports are opened; if you want to open more ports increase the 2nd number respectively
233
+ - ' 8000:8000'
234
+ - ' 9920-9930:9920-9930' # <- added this; only 10 ports are opened; if you want to open more ports increase the 2nd number respectively
228
235
environment:
229
236
- DATABASE_URL=postgres://postgres:${DB_PASSWORD}@db/windmill?sslmode=disable
230
237
- BASE_URL=${WM_BASE_URL}
@@ -247,25 +254,33 @@ services:
247
254
network_mode: bridge
248
255
image: aerokube/selenoid:latest-release
249
256
volumes:
250
- - " /path/to/config:/etc/selenoid" # <- change this
251
- - " /path/to/config/video:/opt/selenoid/video" # <- change this
252
- - " /path/to/config/logs:/opt/selenoid/logs" # <- change this
253
- - " /var/run/docker.sock:/var/run/docker.sock"
257
+ - ' /path/to/config:/etc/selenoid' # <- change this
258
+ - ' /path/to/config/video:/opt/selenoid/video' # <- change this
259
+ - ' /path/to/config/logs:/opt/selenoid/logs' # <- change this
260
+ - ' /var/run/docker.sock:/var/run/docker.sock'
254
261
environment:
255
262
- OVERRIDE_VIDEO_OUTPUT_DIR=./config/video
256
- command: ["-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs"]
263
+ command:
264
+ [
265
+ '-conf',
266
+ '/etc/selenoid/browsers.json',
267
+ '-video-output-dir',
268
+ '/opt/selenoid/video',
269
+ '-log-output-dir',
270
+ '/opt/selenoid/logs'
271
+ ]
257
272
ports:
258
- - " 4444:4444"
273
+ - ' 4444:4444'
259
274
260
275
selenoid-ui:
261
- image: " aerokube/selenoid-ui"
276
+ image: ' aerokube/selenoid-ui'
262
277
network_mode: bridge
263
278
restart: always
264
279
links:
265
280
- selenoid
266
281
ports:
267
- - " 8080:8080"
268
- command: [" --selenoid-uri", " http://selenoid:4444" ]
282
+ - ' 8080:8080'
283
+ command: [' --selenoid-uri', ' http://selenoid:4444' ]
269
284
270
285
volumes:
271
286
db_data: null
@@ -277,7 +292,7 @@ Final structure:
277
292
.
278
293
├── config/
279
294
│ ├── browsers.json
280
- │ ├── video
295
+ │ ├── video
281
296
│ └── logs
282
297
├── .env
283
298
└── docker-compose.yml
@@ -324,7 +339,7 @@ def initiateDriver(macM1=False):
324
339
}
325
340
326
341
driver = webdriver.Remote(command_executor='http://{}:4444/wd/hub'.format(HOST),
327
- desired_capabilities=chrome_capabilities,seleniumwire_options=options)
342
+ desired_capabilities=chrome_capabilities,seleniumwire_options=options)
328
343
329
344
print(f"initiated successfully with port:{i}")
330
345
break
@@ -360,12 +375,12 @@ def initiateDriver(macM1=False):
360
375
}
361
376
362
377
driver = webdriver.Remote(command_executor='http://{}:4444/wd/hub'.format(HOST),
363
- desired_capabilities=chrome_capabilities,seleniumwire_options=options)
378
+ desired_capabilities=chrome_capabilities,seleniumwire_options=options)
364
379
365
380
print(f"initiated successfully with port:{i}")
366
381
break
367
382
except:
368
- print(f"initiating driver with port:{i}")
383
+ print(f"initiating driver with port:{i}")
369
384
if i > 9930:
370
385
print("port limit exceeded")
371
386
break
0 commit comments