Giter VIP home page Giter VIP logo

parking-app's Introduction

PARK'O TOP

About

A web app that searches for nearby parking lots (in France) and stores the user history to show him his expenses and other statistics.

Dependencies

  • Docker
  • Docker Compose

Please note that this project doesn't work offline

Important

You may need to wait a little after setting up the website, before using elements using the database, since it needs to load before. For instance you may get the warning : Warning: mysqli_connect(): (HY000/2002). In that case, just wait a couple of minutes.

Installation

API keys

For security reasons we disabled the API keys that are used in this project. So, you will need to add your own ones in the JS and PHP files. The API keys needed are for Google Maps API and OpenCage A

How to install Docker & Docker Compose

Linux

Depending on your distribution:

  • Red Hat & derivatives: sudo yum install docker
  • Debian & derivatives: sudo apt install docker.io
  • From the installation script: curl −s https://get.docker.com/ | sudo sh

Then:

  • Install Docker Compose: sudo apt install docker-compose

Windows

How to build the containers

Run the following command in the root of this project (parking-app/): docker-compose up -d

How to stop the containers

Run the following command in the root of this project (parking-app/): docker-compose down

If you get an error:

  • Check if you can execute docker ps without sudo. If not then do the following:
    1. sudo groupadd docker
    2. sudo gpasswd -a $USER docker
    3. sudo service docker restart
    4. sudo chown $USER /var/run/docker.sock
    5. If docker-compose still doesn't work then try restarting your computer
  • If you can run docker-compose up -d but you get the error : Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use. The port used by the container may already be used so:
    1. Open parking-app/docker-compose.yml
    2. Change the port at the line - "3307:3307" in ports in db to another ("3308:3308" for instance)
    3. docker-compose up -d

Execution

To open the website

Go to http://localhost:8000/ in your web browser

To edit the database (admin)

  1. Run docker ps
  2. Get the CONTAINER ID (1st column) of the mysql IMAGE
  3. Replace CONTAINER_ID with what you got in (2.), in docker exec -ti CONTAINER_ID bash and run it
  4. Enter mysql -p
  5. Enter the password that was defined in the environment variable MYSQL_ROOT_PASSWORD in docker-compose.yml
  6. Enter use usersdata;
  7. Enter the queries you want to do

Authors

  • Romain Barré
  • Yann Etrillard
  • David Kusmider
  • Robin Meneust
  • Baptiste Ruellan

parking-app's People

Contributors

baat01 avatar davidkusmider avatar gastonks avatar robinmeneust avatar yannet03 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

davidkusmider

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.