Public Repository

Last pushed: 6 months ago
Short Description
Banco Sabadell OBP Sandbox
Full Description

This docker image contains the OpenBankProject: API, SocialFinance & API Explorer

Use this if you want the sandbox experience, make payments etc.

Please note - It can take some time (30 minutes or so!) for the services to come up after starting docker run whilst sources are downloaded and compiled. See below for commands to check the status.

TLDR;

Linux:

$ docker run -d -p 8080-8082:8080-8082 -e "OBP_API_HOSTNAME=http://127.0.0.1:8080" -e "OBP_BASE_URL_API_EXPLORER=http://localhost:8082" -e "OBP_BASE_URL_SOCIAL_FINANCE=http://localhost:8081" -e "OBP_WEBUI_API_EXPLORER_URL=http://localhost:8082" openbankproject/obp-full
Mac / Windows (via Docker Machine and Virtual Box)

PLEASE NOTE! :-) The domain names used below i.e. localapi.tesobe.net, localsofi.tesobe.net and localexplorer.tesobe.net are already setup on the net to resolve to the default IP address for Docker containers on the Mac.They are used to help you get started. There is no need to edit your hosts file. Please check you can ping localapi.tesobe.net which should point to the IP address of the docker container.

$ docker run -d -p 8080-8082:8080-8082 -e "OBP_API_HOSTNAME=http://localapi.tesobe.net:8080" -e "OBP_BASE_URL_API_EXPLORER=http://localexplorer.tesobe.net:8082" -e "OBP_BASE_URL_SOCIAL_FINANCE=http://localsofi.tesobe.net:8081" -e "OBP_WEBUI_API_EXPLORER_URL=http://localexplorer.tesobe.net:8082" openbankproject/obp-full
Note: Since the Mac command requires DNS resolution it's important that the Virtual Box Docker host has the correct name server. If you move your laptop to a new location (change wifi / network) make sure to restart your Docker host with: docker-machine restart default

Now get some lunch / do some Tai Chi ;-) whilst sources are downloaded / compiled. SocialFinance and API Explorer won't work until the API has come up. You also should have at least 2 GB of RAM available.

To check progress, you can enter the container and look at the logfiles.

1) Check the container is running and find your CONTAINER_ID:

docker ps

2) Enter the container with:

docker exec -it YOUR_CONTAINER_ID bash

3) cd to /var/log/supervisor/

TERM=vt100 watch -n1 tail /var/log/supervisor/*-stdout.log

or

tail -f -n 500 file_you_want_to_log_at.log

The API will be exposed at port 8080, SocialFinance at 8081 and the API Explorer at 8082. The image comes with preloaded data from https://github.com/OpenBankProject/OBP-API/blob/develop/src/main/scala/code/api/sandbox/example_data/example_import.json .

Hostnames

Most machines will have localhost and 127.0.0.1 set up automatically as available hostnames pointing to your local machine on the same network device (usually loopback). If not, make sure you have an entry like this in /etc/hosts:

127.0.0.1 localhost
If you want to use different hostnames, e.g. api, explorer and sofi, you have to setup the required changes to the DNS yourself. The names must be available to both your (local) host machine and the container. You can achieve that by both using the same DNS server (default), but you need to be able to add the preferred hostnames to that server. Or you can fudge the host's and container's /etc/hosts files, see http://docs.docker.com/engine/reference/run/#managing-etc-hosts .

Ports

Currently, ports 8080 to 8082 need to be available on your host machine as, otherwise some parts might not work properly.

The following environment variables need to be set when running it:

OBP_BASE_URL_API_EXPLORER : The base URL to be used for the API Explorer
OBP_BASE_URL_SOCIAL_FINANCE : The base URL to be used for SocialFinance
OBP_WEBUI_API_EXPLORER_URL : The URL of the API Explorer, used by web interface of SocialFinance & API
OBP_API_HOSTNAME : The hostname to be used for the API, must be different from API Explorer / Social Finance !

More info about the Open Bank Prorject: https://openbankproject.com/
Dockerfile available at: https://github.com/BancoSabadell/OBP-Docker

Docker Pull Command
Owner
bancosabadell

Comments (0)