This docker image contains the OpenBankProject: API
Use this if you want the sandbox experience, make payments etc.
Please note - It can take some time for the services to come up after starting docker run whilst sources are downloaded and compiled. See below for commands to check the status.
$ docker run -d -p 8080:8080 -e "OBP_API_HOSTNAME=http://127.0.0.1:8080" openbankproject/obp-api
Mac / Windows (via Docker Machine and Virtual Box)
PLEASE NOTE! :-) The domain names used below i.e. localapi.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:8080 -e "OBP_API_HOSTNAME=http://localapi.tesobe.net:8080" openbankproject/obp-api
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 4 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:
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
tail -f -n 500 file_you_want_to_log_at.log
The API will be exposed at port
8080. 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 .
Most machines will have
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
If you want to use different hostnames, e.g.
api, 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 .
8080 needs 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_API_HOSTNAME : The hostname to be used for the API