Coder Social home page Coder Social logo

etf-validator / etf-webapp-docker Goto Github PK

View Code? Open in Web Editor NEW
2.0 7.0 8.0 94 KB

The docker image for the INSPIRE validator is now distributed in a dedicated repository. Please see:

Home Page: https://github.com/inspire-eu-validation/community/releases

License: European Union Public License 1.2

Shell 81.10% Dockerfile 18.90%
etf docker-image

etf-webapp-docker's Introduction

etf-WebApp docker image

etf-webapp

European Union Public Licence 1.2

Docker image of the ETF web application. ETF is an open source testing framework for testing geo network services and data. The image is mainly used for testing purposes and therefore the container loads the latest development version. The image is based on the official jetty image.

Please open a new issue for questions and issues regarding the installation of the docker image here.

Please open a new issue for questions and issues regarding the ETF validator here.

Prerequesites

This docker image requires an installed and configured the docker-engine. The image has been tested on Linux machines.

It is recommended to install docker-compose for securing the instance with an HTTP proxy server and for easier updating.

Quickstart

To start a new container on port 8080 and create a 'etf' data directory in your home directory, run the following command:

docker run --name etf -d -p 80:8080 -v ~/etf:/etf iide/etf-webapp:latest

If you need to change the host data directory, you must change the first value after the '-v' parameter, for instance '-v /home/user1/my_etf:etf'. See the Docker documentation for more information.

The 'docker ps' command should list the running container:

$ docker ps -a
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                         NAMES
63affde23fbb        iide/etf-webapp:latest   "/docker-entrypoin..."   2 minutes ago       Up 2 minutes        0.0.0.0:8080->8080/tcp        etf

Open your browser and enter the URL (http://localhost/etf-webapp) which should show the web interface (note that the startup may need some time).

alt screenshot

Setup ETF with docker-compose

Make sure you have at least docker-compose version 1.8 installed:

docker-compose -v

Create a 'etfenv' directory and download the three files:

mkdir etfenv && cd etfenv && \
wget https://raw.githubusercontent.com/etf-validator/etf-webapp-docker/master/etfenv/docker-compose.yml && \
wget https://raw.githubusercontent.com/etf-validator/etf-webapp-docker/master/etfenv/htpasswd.txt && \
wget https://raw.githubusercontent.com/etf-validator/etf-webapp-docker/master/etfenv/nginx.conf

The compose script will setup a protected nginx webserver (User/Password: etf/etf) which forwards all requests to the etf-webapp container. The htpasswd.txt and the nginx.conf files are mounted read only in the container. You can edit the nginx config file or use htpasswd on your linux machine to create your own credentials.

Unless it is changed in the compose script (docker-compose.yml), the etf-webapp containers data directory is mounted to /etf on your host system. This can be changed by editing the first values in the volumes section of the docker-compose file. For instance for the directory '/home/user1/my_etf' :

 volumes:
  - /home/user1/my_etf/config:/etf/config
  - /home/user1/my_etf/testdata:/etf/testdata
  - /home/user1/my_etf/http_uploads:/etf/http_uploads
  - /home/user1/my_etf/projects:/etf/projects
  - /home/user1/my_etf/bak:/etf/bak
  - /home/user1/my_etf/logs:/etf/logs
  - /home/user1/my_etf/ds/obj:/etf/ds/obj
  - /home/user1/my_etf/ds/attachments:/etf/ds/attachments

Please note that docker-compose.yml is a YAML file and whitespace indentation is used to denote structure!

To start the container run:

docker-compose up -d

On first start, the container will download the latest version of the ETF from the interactive instruments repository.

The INSPIRE Executable Test Suites are automatically downloaded from the INSPIRE ets-repository and installed into the /etf/projects/inspire-ets-repository directory.

The progress can be observed by invoking:

docker-compose logs -f

Open your browser with the URL (http://localhost) and enter the credentials (default etf/etf) to access the web interface. If you access the interface not only from your local machine, you need to edit the etf-config.properties config file, which will be automatically created on first startup in the mounted /etf/config directory. Change localhost in the property etf.webapp.base.url to an IP or a domain name. Afterwards you need to restart the container:

docker-compose restart

Log file

The log file etf.log is located in the /etf/logs directory.

Organization internal proxy server

If outgoing network traffic is filtered by a proxy server in your organization, you need to configure the container with proxy settings before startup. The container provides settings for configuring proxy server for HTTP and HTTP Secure:

# Activate HTTP proxy server by setting a host (IP or DNS name).
# Default: "none" for not using a proxy server
HTTP_PROXY_HOST none
# HTTP proxy server port. Default 8080. If you are using Squid it is 3128
HTTP_PROXY_PORT 8080
# Optional username for authenticating against HTTP proxy server or "none" to
# deactivate authentication
HTTP_PROXY_USERNAME none
# Optional password for authenticating against HTTP proxy server or "none"
HTTP_PROXY_PASSWORD none

# Activate HTTP Secure proxy server by setting a host (IP or DNS name).
# Default: "none" for not using a proxy server
HTTPS_PROXY_HOST none
# HTTP Secure proxy server port. Default 3129.
HTTPS_PROXY_PORT 3129
# Optional username for authenticating against HTTPS proxy server or "none" to
# deactivate authentication
HTTPS_PROXY_USERNAME none
# Optional password for authenticating against HTTP Secure proxy server or "none"
HTTPS_PROXY_PASSWORD none

These settings can be added in the docker-compose file.

Update ETF

Run the following commands in the directory of the ETF compose script to stop and update the container:

docker-compose stop
docker-compose rm
docker-compose pull
docker-compose up -d

This will destroy the container and create a new container with the ETF application. The /etf data directory does not get deleted -as long as it is mounted on your host machine!

Update Executable Test Suites

To update the Executable Test Suites, you can copy the new Executable Test Suites into the /etf/projects/ directory (or the subdirectories). The instance will automatically reload the Executable Test Suites after some time.

Custom Executable Test Suites

If you want to deploy your instance directly with custom Executable Test Suites that are downloaded on container startup, you can change the environment variable ETF_TESTPROJECTS_ZIP to another URL. See the docker-compose.yml environment section.

etf-webapp-docker's People

Contributors

jonherrmann avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.