Code Monkey home page Code Monkey logo

openhi-docker-dev's Introduction

openhi-docker-dev

Ready-made Enhydris development environment

Prerequisites

  • On Windows: VirtualBox
  • Linux: Docker

Setting up

  1. Clone this repository: git clone [email protected]:openmeteo/openhi-docker-dev.

  2. Enter the working directory: cd openhi-docker-dev

  3. 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
    
  4. Get a database dump file named dbdump.tar.gz and put it in the shared directory.

  5. (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.)

  6. ./build.sh will build the image.

  7. ./run.sh will create/start the container.

  8. Once in the container, dbimport will import the database.

  9. python manage.py migrate will ensure the database is up-to-date (the database import file could be slightly out of date).

  10. In the container, runserver will start the server.

  11. In your browser, visit http://localhost:8001/.

Running the unit tests in a visible browser

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:

  1. In enhydris/enhydris_project/settings/local.py, comment out the line chrome_options.add_argument("--headless").
  2. Use a VNC client to connect to localhost:5901, using topsecret as the password.

Then, when you run the Selenium tests, they should be visible.

openhi-docker-dev's People

Contributors

aptiko avatar dkalog avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.