Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions solution/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
README
Prerequisites
====
How to run the your solution...
How to get setup
We have 3 parts to the setup.
1. A springboot application build using java 17 using maven.
2. A python web application using flask.
3. A docker container running a postgres database.

IMPORTANT
1.1. Springboot application will create the database tables and populate them with data
via the REST API endpoints.

1.2 to set this application you will need java installed on your machine.
I'm using Java 17.0.1. I would suggest you use the same version.

1.3 You will also need maven installed on your machine. I'm using
maven 3.8.6. I would suggest you use the same version.

2.1 The python application will expose one REST API to get the EUR to GBP exchange rate.
the springboot application will call this API to get the exchange rate on port 5000.

2.2 to set this application you will need python installed on your machine.
I'm using python 3.8 I would suggest you use the same version.


How to run the applications
====
To avoid unconcious bias, we aim to have your submission reviewed anonymously by one of our engineering team. Please try and avoid adding personal details to this document such as your name, or using pronouns that might indicate your gender.
Once all the above is installed run the applications.

To run the springboot application run the following command in the root of the java project.
- run mvn clean install
- mvn spring-boot:run

To run the python application run the following command in the root of the python project.
- export FLASK_APP=exchange_rate_service_v1.py
- flask run

To run the docker container run the following command in the root of the solution project.
- docker-compose up
28 changes: 28 additions & 0 deletions solution/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3.4'

services:
postgresql_database:
image: postgres:latest
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin1234
- POSTGRES_DB=productDb
ports:
- "5432:5432"
restart: always
volumes:
- database-data:/var/lib/postgresql/data/

pgadmin:
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
- PGADMIN_DEFAULT_PASSWORD=admin1234
ports:
- '5050:80'
restart: always
volumes:
- pgadmin:/root/.pgadmin
volumes:
database-data:
pgadmin: