The Asteroid Hotels REST API is a reservation system for a fictitious hotel group, the Asteroid Group. The Asteroid Group operates hotels on select asteroids in the solar system. Using the API, users can search hotels and make reservations. The API is live and Swagger documentation can be found at astrdhotels.com.
The API is built with Flask-RESTX, SQLAlchemy, PyJWT, PyEphem, Postgres, and Docker. The API web service is deployed on GCP Cloud Run. The Postgres database runs on a f1-micro Compute Engine instance to take advantage of the free tier. Github Actions is used for continuous integration. This repo is mirrored in Cloud Source Repositiories and Cloud Build is used for continuous deployment.
- Clone repo locally
git clone https://github.com/clpatterson/hotel_api.git
- Start up local development environment in project root directory
docker-compose up --build
- Initialize and seed the database with cli command
docker-compose exec api hotel_api db reset --with-testdb --dev
- Run integration and unit tests
docker-compose exec api py.test tests/