Add /apps setup and spec out more targets

This commit is contained in:
Luke Murphy 2020-06-30 20:35:01 +02:00
parent 5852a3649f
commit ad1d46cc2c
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 19 additions and 8 deletions

View File

@ -1,10 +1,13 @@
build:
python-run:
@python magic_app/app.py
docker-build:
@docker build -t autonomic/magicapp .
run:
docker-run:
@docker run --rm -p 5000:5000 autonomic/magicapp
publish:
docker-publish:
@docker push autonomic/magicapp:v0.1.0
.PHONY: build run
.PHONY: python-run docker-build docker-run docker-publish

View File

@ -9,12 +9,12 @@ A swarm of dreams.
```bash
$ python3 -m venv .venv && source .venv/bin/activate
$ pip install -r requirements.txt
$ python run.py
$ make python-run
```
## Go Go Go Yes Docker
```bash
$ make build
$ make run
$ make docker-build
$ make docker-run
```

View File

@ -1,6 +1,6 @@
"""The Magic App."""
from flask import Flask, render_template
from flask import Flask, render_template, send_from_directory
app = Flask(__name__)
@ -10,5 +10,10 @@ def home():
return render_template("index.html")
@app.route("/apps")
def apps():
return send_from_directory("static", "apps.json")
if __name__ == "__main__":
app.run(host="0.0.0.0")

View File

@ -0,0 +1,3 @@
{
"gitea": "https://git.autonomic.zone/compose-stacks/gitea"
}