forked from https://git.cyberia.club/cyberia/capsul-flask with a dockerfile from https://git.coopcloud.tech/3wordchant/capsul-flask/src/branch/master/docs/local-set-up.md just trying to arrive at a working drone config for building docker images
Go to file
knoflook d2141167bd
Some checks failed
continuous-integration/drone/push Build is failing
don't build in compose
2022-05-09 15:31:23 +02:00
capsulflask get capacity from /proc/meminfo (via 3wordchant/capsul-flask) 2022-05-09 15:30:48 +02:00
docs s/postrges/postgres/ 2022-04-11 20:01:02 +00:00
.drone.yml fix docker passwd 2022-04-20 12:44:07 +02:00
.gitignore ignore forests baikal notes 2022-02-08 12:54:07 -06:00
app.py trying to fix logging 2020-05-15 23:19:01 -05:00
docker-compose.yml don't build in compose 2022-05-09 15:31:23 +02:00
Dockerfile first working release 2022-04-20 15:22:14 +02:00
letsencrypt-root-ca.crt Update Letsencrypt root cert used for postgres TLS 2021-10-05 10:47:21 -05:00
LICENSE.md affero GPL license 2020-05-26 19:56:09 -05:00
Pipfile testing on debian based image 2022-04-20 14:51:31 +02:00
Pipfile.lock testing on debian based image 2022-04-20 14:51:31 +02:00
README.md add pipenv trouble shooting notes 2022-04-11 19:29:21 -05:00
setup.cfg affero GPL license 2020-05-26 19:56:09 -05:00
setup.py postgres automatic schema management roughly working 2020-05-09 19:13:20 -05:00

capsul-flask

screenshot of capsul.org home page

Python Flask web application implementing user accounts, payment, and virtual machine management for a smol "virtual machine (vm) as a service" aka "cloud compute" provider. Originally developed by Cyberia Computer Club for https://capsul.org

capsul-flask integrates with Stripe as a credit card processor, and BTCPay Server as a cryptocurrency payment processor.

capsul-flask invokes shell-scripts to create/manage libvirt/qemu vms, and it depends on dnsmasq to act as the DHCP server for the vms.

capsul-flask has a "hub and spoke" architecture. The "Hub" runs the web application and talks to the Postgres database, while the "Spoke"(s) are responsible for creating/managing virtual machines. In this way, capsul can be scaled to span more than one machine. One instance of the capsul-flask application can run in both hub mode and spoke mode at the same time, however there must only be one instance of the app running in "Hub" mode at any given time.

Quickstart (run capsul-flask on your computer in development mode)

# get an instance of postgres running locally on port 5432
# (you don't have to use docker, but we thought this might be the easiest for a how-to example)
docker run --rm -it -e POSTGRES_PASSWORD=dev -p 5432:5432 postgres &

# install dependencies 
sudo apt install pipenv python3-dev libpq-dev

# download and run
git clone https://giit.cyberia.club/~forest/capsul-flask
cd capsul-flask
pipenv install
pipenv run flask run
# these are some notes I kept related to pipenv troubleshooting:
python3 -m pip uninstall pipenv
python3 -m pip uninstall virtualenv
python3 -m pip install pipenv
python3 -m pipenv install

Interested in learning more? How about a trip to the the docs/ folder: