Table of Contents
"GymApp" is a university project related to the "Databases" course created for the purpose of managing a gym during the covid-19 period, via an online booking system, completely built from scratch.
Respectively for front-end, back-end and database the following tools have been used:
- Front-end: The Angular 13 framework was used.
- Back-End: Python, Flask and SQLAlchemy were used.
- Database: PostgreSQL
In addition, Docker was used to manage containers running the processes: Flask-App (back-end) and PosgreSQL database, in isolated environments!
This is a really basic project based on a single postgreSQL database which is connected from a single flask rest-applications server which in turn communicates with the basic front-end webpage. The purpose of this project is also to dockerize as much as possible, in order to, after-all enable a easy blue-red pipeline for CI/CD scope.
To get a local copy up and running follow these simple example steps.
-
You should have installed Docker here in your local machine.
-
And also docker-compose here.
-
Before proceeding with the build and run of the project be carefull on setting correctly the POSTGRES_HOST env variable inside the Dockerfile file.
-
In order to set it correctly check your own local machine ip, and set it as you see.
Command line for the PostgreSQL docker container :
-
In the same folder of docker-compose.yml run :
docker-compose up -d
-
To see the image and container you just created :
docker image ls docker ps
Command list for the Flask docker container :
-
In the same folder of the Dockerfile run :
docker build -t flask:0.1 . docker run -dit -p 5000:5000 flask:0.1 docker container logs -f {id}
Now you can interact with the rest-application server with Postman, for example :
curl --location --request POST 'http://127.0.0.1:5000/add' \
--header 'Content-Type: application/json' \
--data-raw '{
"name" : "Ivan",
"price" : 3000,
"breed" : "type"
}'
curl --location --request GET 'localhost:5000/'
For more examples, please refer to the (work in progress) Documentation
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request