Skip to content

mcneel/cloudzoo-issuer

Repository files navigation

cloudzoo-issuer

A starting point for a third-party Cloud Zoo issuer

Getting Started

The steps below will get you up and running on your local machine for development and testing. The instructions are currently macOS-specific. You'll need git and Python 3 pre-installed on your machine.

  1. Clone the repository

    git clone https://github.com/mcneel/cloudzoo-issuer
    cd cloudzoo-issuer
    
  2. (Optional) Use a virtual environment

    python -m venv venv
    . venv/bin/activate
    pip install -U pip wheel
    

    This allows you to install python packages for this project and only this project

  3. Install python packages

    pip install -r requirements.txt
    
  4. Create a .env file (for local use only)

    cp .env.example .env
    

    This allows you to define environment variables for this project and only this project

  5. Create the initial database

    flask create-db
    
  6. Run the app

    flask run
    
  7. In another terminal, test the endpoints

    curl http://localhost:5000/info
    
    You have 3 licenses!
    

Troubleshooting

Flask's default port (5000) is used by AirPlay Receiver in macOS Monterey. Either turn it off, or choose a different port (e.g. flask run -p 5001).

Deploy

Heroku

The recommended option. Super easy!

Deploy

Docker

docker-compose up -d
docker-compose exec web flask create-db

docker-compose logs -f