A web app that searches for nearby parking lots (in France) and stores the user history to show him his expenses and other statistics.
- Docker
- Docker Compose
Please note that this project doesn't work offline
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.
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
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
- Download & install: https://docs.docker.com/desktop/install/windows-install/
- Run
wsl --update
Run the following command in the root of this project (parking-app/): docker-compose up -d
Run the following command in the root of this project (parking-app/): docker-compose down
- Check if you can execute
docker ps
without sudo. If not then do the following:sudo groupadd docker
sudo gpasswd -a $USER docker
sudo service docker restart
sudo chown $USER /var/run/docker.sock
- 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:- Open
parking-app/docker-compose.yml
- Change the port at the line
- "3307:3307"
inports
indb
to another ("3308:3308"
for instance) docker-compose up -d
- Open
Go to http://localhost:8000/ in your web browser
- Run
docker ps
- Get the CONTAINER ID (1st column) of the mysql IMAGE
- Replace CONTAINER_ID with what you got in (2.), in
docker exec -ti CONTAINER_ID bash
and run it - Enter
mysql -p
- Enter the password that was defined in the environment variable MYSQL_ROOT_PASSWORD in docker-compose.yml
- Enter
use usersdata;
- Enter the queries you want to do
- Romain Barré
- Yann Etrillard
- David Kusmider
- Robin Meneust
- Baptiste Ruellan