8000 GitHub - radupotop/ships-api: Polestar coding challenge
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

radupotop/ships-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
< 8000 /div>
 
 
 
 
 
 
 
 

Repository files navigation

Each part of the app runs in a separate Docker container orchestrated using docker-compose.

  • db
  • app
  • setup

The setup is intended to run only once.

The tests are the only exception, they run inside a venv.

Building and running

The setup container is only meant to be run once when initially creating the db and loading the csv.

docker-compose build
docker-compose up -d db
docker-compose up -d setup # only run once
docker-compose up -d app

The running app can be found at http://localhost:8000/

The API can be found at:

Running Tests

The tests need the db container to be up. These two commands need to be done before running the tests:

docker-compose build # if not already built
docker-compose up -d db

And then:

cd app
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python test.py

About

Polestar coding challenge

Resources

Stars

Watchers

Forks

Packages

No packages published
0