Ready-made Enhydris development environment
- On Windows: VirtualBox
- Linux: Docker
-
Clone this repository:
git clone [email protected]:openmeteo/openhi-docker-dev
. -
Enter the working directory:
cd openhi-docker-dev
-
Clone the Enhydris repositories:
git clone [email protected]:openmeteo/enhydris git clone [email protected]:openmeteo/enhydris-synoptic git clone [email protected]:openmeteo/enhydris-autoprocess git clone [email protected]:openmeteo/enhydris-openhigis
-
Get a database dump file named
dbdump.tar.gz
and put it in theshared
directory. -
(Windows/Vagrant only).
vagrant up vagrant ssh cd /vagrant
(Note: We haven't had success trying to run Docker on Windows, and how it will turn out depends on the operating system version and edition and on the hardware. We therefore use vagrant on VirtualBox to create a Debian machine, and we run Docker inside the Debian machine.)
-
./build.sh
will build the image. -
./run.sh
will create/start the container. -
Once in the container,
dbimport
will import the database. -
python manage.py migrate
will ensure the database is up-to-date (the database import file could be slightly out of date). -
In the container,
runserver
will start the server. -
In your browser, visit http://localhost:8001/.
First, make sure that the chrome_options
and SELENIUM_WEBDRIVERS
settings in enhydris/enhydris_project/settings/local.py
are as they
are in local.py
(in the root directory of enhydris-docker-dev
). (The
top-level local.py
is copied to
enhydris/enhydris_project/settings/local.py
when the container is
built, unless the latter file already exists.)
By default, selenium tests are run headlessly. If you want to make them visible, then:
- In
enhydris/enhydris_project/settings/local.py
, comment out the linechrome_options.add_argument("--headless")
. - Use a VNC client to connect to
localhost:5901
, usingtopsecret
as the password.
Then, when you run the Selenium tests, they should be visible.