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.gzand put it in theshareddirectory. -
./build.shwill build the image. -
./run.shwill create/start the container. -
Once in the container,
dbimportwill import the database. -
python manage.py migratewill ensure the database is up-to-date (the database import file could be slightly out of date). -
In the container,
npm installwill install npm packages needed for the tests. (NOTE: On Windows you have to entersudo npm installinstead, because of docker/for-win#2476.) -
In the container,
runserverwill 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, usingtopsecretas the password.
Then, when you run the Selenium tests, they should be visible.