Skip to content

valentinbourgoin/captain-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Train station finder

Find the nearest train station on a map !

I used the Captain Train open data, found here. Frontend app is built in VueJS with gulp / webpack compilation process. The backend API is a python app, using Django REST Framework, running in Docker component. Stations objects are imported in proper PgSQL database.

Installation

Frontend

Requirements :

  • node JS and npm

    npm install npm run dev

Server is running on http://localhost:8080/ by default.

Backend

Requirements :

Create VM (if necessary) and build services :

docker-machine create -d virtualbox dev;
docker-compose build
docker-compose up -d

Sync database and import CSV data (make sure stations submodule is cloned and up to date) :

docker-compose run --rm web /usr/local/bin/python manage.py migrate
docker-compose run --rm web /usr/local/bin/python manage.py import 

Then, get docker machine IP :

docker-machine ip dev 

You may have to change API URL in front/scripts/config.js, according to docker machine IP.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages