Permalink
Browse files

app: pass SCREEN_WIDTH and SCREEN_HEIGHT from env in compose to new c…

…ontainer (TODO: make customizable per container)

add ie scrollbars example
  • Loading branch information...
1 parent 0905711 commit 3a8ba34e00a7ea0d0bcfda35f16235b7ae295c59 @ikreymer ikreymer committed Sep 22, 2015
Showing with 11 additions and 1 deletion.
  1. +7 −1 app/main.py
  2. +4 −0 docker-compose.yml
  3. BIN sample-screenshots/2006_scrollbars.png
View
@@ -115,7 +115,13 @@ def init_container():
else:
tag = 'netcapsule/firefox'
- vnc_port, cmd_port = dc.new_container(tag, {'URL': url, 'TS': ts})
+ env = {}
+ env['URL'] = url
+ env['TS'] = ts
+ env['SCREEN_WIDTH'] = os.environ.get('SCREEN_WIDTH')
+ env['SCREEN_HEIGHT'] = os.environ.get('SCREEN_HEIGHT')
+
+ vnc_port, cmd_port = dc.new_container(tag, env)
host = request.environ.get('HTTP_HOST')
host = host.split(':')[0]
View
@@ -23,5 +23,9 @@ app:
- /var/run/docker.sock:/var/run/docker.sock
- ./app/browser:/browser
+ environment:
+ - SCREEN_WIDTH=1360
+ - SCREEN_HEIGHT=1020
+
ports:
- 9020:9020
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a8ba34

Please sign in to comment.