Open mangust404 opened 8 years ago
Thanks for that pull request. Could you please provide some notes on how to use it please? (My bash kung-foo is not that good). i.e. I presume that this is controlled by environment variables.?
When you download a fresh copy just start ./docker_build.sh and then ./docker_run.sh. It will generate index.html and index.docker.conf and open your default browser with "http://<docker_ip>:<port>/".
No environment variables. It's a simple "bash source" config format. For example, my index.docker.conf looks like:
# Local docker container listen address and port. Assigned automatically, usually you
# don't want to change this.
TLE_CLIENT_LISTEN="172.17.42.1"
TLE_CLIENT_PORT="8080"
# Local loader script path.
TLE_LOAD_SCRIPT="lacuna/load.js"
# Server-side RPC url. For working with production server, use "http://us1.lacunaexpanse.com/"
# For testing you may use your local Lacuna Server setup, e.g. "http://192.168.99.100:5000/"
# Trailing slash is required.
LACUNA_RPC_BASE_URL="http://us1.lacunaexpanse.com/"
# Amazon s3 cloud assets address.
LACUNA_S3_BASE_URL="//d16cbq0l6kkf21.cloudfront.net/"
# Some values you probably wish to change sometimes on your local repo.
LACUNA_YII_LOADER_SRC="//ajax.googleapis.com/ajax/libs/yui/2.8.1/build/yuiloader/yuiloader-min.js"
LACUNA_JQUERY_SRC="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
LACUNA_PNOTIFY_JS_SRC="//cdnjs.cloudflare.com/ajax/libs/pnotify/2.0.0/pnotify.all.min.js"
LACUNA_PNOTIFY_CSS_SRC="//cdnjs.cloudflare.com/ajax/libs/pnotify/2.0.0/pnotify.all.min.css"
LACUNA_FAVICON="http://s3.amazonaws.com/www.lacunaexpanse.com/favicon.png"
LACUNA_SHORTCUT_ICON="http://s3.amazonaws.com/www.lacunaexpanse.com/favicon.ico"
LACUNA_PULSE_INDICATOR="//s3.amazonaws.com/us1.lacunaexpanse.com/assets/ui/pulse-indicator.gif"
Later, if you need to change something in index.html, you should modify index.docker.conf and run ./docker_run.sh again.
There's only one problem left: when you run ./docker_run.sh after system restart, it will take some time until the docker container will actually start and start to listen on 8080 port. So your browser will show the page "err_conn_refused" until that moment. We should find the way to wait until docker container will be actually up and then open the URL.
First problem I had with this is that I don't have a 'local browser' in most instances.
For example, running this on a remote linode server over SSH.
Also when running this on windows or mac (with a VM) there is no local browser in the VM.
Another use-case I have is the need to frequently test on my local running server, or on us1, or on pt, which still means modification of the config file to change the server. If we are going down the way of scripting this it would be useful to have an easy way to skip between these servers rather than either having to edit the index.html file (as now) or edit the index.docker.conf. Perhaps have a command-line argument, or different conf files?
Configuration file for index.html is being generated as well. Duplicate "yuiloader-min.js" commented out.