Compare commits

..
9 Commits
Author SHA1 Message Date
br 1dc0d9588f typo
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Has been skipped
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Successful in 4s
2026-08-03 17:50:14 +02:00
br 78f1a68438 app-name
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Has been skipped
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Failing after 3s
2026-08-03 17:47:18 +02:00
br 6f0d0a952d corrections für https behind webproxy
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Has been skipped
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Failing after 4s
2026-08-03 16:59:44 +02:00
br 574e3cb6c4 instance folder in compose
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Successful in 4s
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Has been skipped
2026-08-03 16:35:45 +02:00
br 0739de4b44 portsettings für docker + cli noch angepasst. jetzt ist .env führend
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Successful in 5s
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Has been skipped
2026-08-03 16:26:23 +02:00
br a54f26f808 deploy korrigiert
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Failing after 4s
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Has been skipped
2026-08-03 16:13:24 +02:00
br b5f1e7a469 nonsense retour
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Failing after 3s
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Has been skipped
2026-08-03 16:08:26 +02:00
br e72a66fe94 nonsense
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Failing after 2s
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Has been skipped
2026-08-03 16:01:27 +02:00
br 8f92e53fa8 deploy-jedönse drin
Formeleon Deployment Pipeline / Deploy to Dev Environment (push) Failing after 30s
Formeleon Deployment Pipeline / Deploy to Production Environment (push) Has been skipped
2026-08-03 15:59:00 +02:00
5 changed files with 75 additions and 10 deletions

No files matched your search

+2
View File
@@ -22,6 +22,8 @@ FLASK_DEBUG=true
# Development Mode - enables fake auth and mocking # Development Mode - enables fake auth and mocking
DEV_MODE=true DEV_MODE=true
APP_NAME=formeleon_dev
# Application port (default: 5000) # Application port (default: 5000)
# PORT=5000 # PORT=5000
+55
View File
@@ -0,0 +1,55 @@
name: Formeleon Deployment Pipeline
on:
push:
branches:
- main
- stable
jobs:
# ---------------------------------------------------
# 1. DEPLOYMENT TO DEVELOPMENT (branch: main)
# ---------------------------------------------------
deploy-dev:
name: Deploy to Dev Environment
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH to Dev
uses: appleboy/ssh-action@v1
with:
# Flexibel über "Settings -> Actions -> Variables" editierbar:
host: ${{ vars.DEV_HOST }}
username: ${{ vars.DEV_DEPLOY_USER }}
# Passwörter/Keys weiterhin über "Secrets":
key: ${{ secrets.DEV_SSH_KEY }}
port: 22
script: |
cd /cryptDisk/formeleon-dev
git pull origin main
docker compose down
docker compose up -d --build
# ---------------------------------------------------
# 2. DEPLOYMENT TO PRODUCTION (branch: stable)
# ---------------------------------------------------
deploy-prod:
name: Deploy to Production Environment
if: github.ref == 'refs/heads/stable'
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH to Prod
uses: appleboy/ssh-action@v1
with:
host: ${{ vars.PROD_HOST }}
username: ${{ vars.PROD_DEPLOY_USER }}
key: ${{ secrets.PROD_SSH_KEY }}
port: 22
script: |
cd /cryptDisk/formeleon-prod
git pull origin stable
docker compose down
docker compose up -d --build
+7 -7
View File
@@ -70,14 +70,14 @@ Für das vollständige Linux- / Staging-Gefühl kannst du Docker nutzen. Durch V
```bash ```bash
# 1. Image bauen und Container starten # 1. Image bauen und Container starten
docker-compose up --build docker compose up --build
# 2. Anwendung beenden # 2. Anwendung beenden
# (Strg+C oder:) # (Strg+C oder:)
docker-compose down docker compose down
# 3. Datenbank und Volumes komplett zurücksetzen # 3. Datenbank und Volumes komplett zurücksetzen
docker-compose down -v && docker-compose up --build docker compose down -v && docker-compose up --build
``` ```
### Docker CLI-Kommandos ausführen ### Docker CLI-Kommandos ausführen
@@ -85,16 +85,16 @@ Du kannst `flask` Kommandos direkt gegen den laufenden Container feuern:
```bash ```bash
# Datenbank Migrationen anlegen # Datenbank Migrationen anlegen
docker-compose run --rm app flask db migrate -m "neue migration" docker compose run --rm app flask db migrate -m "neue migration"
# Datenbank-Schema updaten # Datenbank-Schema updaten
docker-compose run --rm app flask db upgrade docker compose run --rm app flask db upgrade
# Datenbank mit Testdaten füllen # Datenbank mit Testdaten füllen
docker-compose run --rm app flask seed-db docker compose run --rm app flask seed-db
# Shell im Container öffnen # Shell im Container öffnen
docker-compose run --rm app bash docker compose run --rm app bash
``` ```
### Zugriff auf die Anwendung ### Zugriff auf die Anwendung
+8 -1
View File
@@ -39,6 +39,7 @@ from utils.cli import register_cli_commands
from utils.middleware import setup_dev_mode_middleware, get_current_user, get_current_tenant from utils.middleware import setup_dev_mode_middleware, get_current_user, get_current_tenant
from utils.helpers import get_request_context from utils.helpers import get_request_context
from werkzeug.middleware.proxy_fix import ProxyFix
# Initialize extensions globally (will be bound to app in create_app) # Initialize extensions globally (will be bound to app in create_app)
migrate = Migrate() migrate = Migrate()
@@ -66,6 +67,12 @@ def create_app(config_class: Optional[type] = None) -> Flask:
app = Flask(__name__) app = Flask(__name__)
app.config.from_object(config_class or get_config_class()) app.config.from_object(config_class or get_config_class())
# Vertraue 1 Reverse Proxy (NPM) für X-Forwarded-For, Proto, Host, Port
app.wsgi_app = ProxyFix(
app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1, x_prefix=1
)
# Set up logging # Set up logging
setup_logging(app) setup_logging(app)
@@ -229,4 +236,4 @@ app = create_app()
if __name__ == '__main__': if __name__ == '__main__':
# This allows running the app directly with python app.py # This allows running the app directly with python app.py
# In production, use gunicorn or other WSGI servers # In production, use gunicorn or other WSGI servers
app.run(host='0.0.0.0', port=5000, debug=app.config['DEBUG']) app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 5000)), debug=app.config['DEBUG'])
+3 -2
View File
@@ -3,9 +3,9 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: formeleon-app container_name: "${APP_NAME:-formeleon}"
ports: ports:
- "5000:5000" - "${PORT:-5000}:5000"
volumes: volumes:
# Mount entire project directory for hot-reload in development # Mount entire project directory for hot-reload in development
# Exclude the virtual environment if it exists locally to prevent conflicts with container venv # Exclude the virtual environment if it exists locally to prevent conflicts with container venv
@@ -13,6 +13,7 @@ services:
- /app/venv - /app/venv
# Persistent data volumes mapping to host # Persistent data volumes mapping to host
# - ./data:/app/data # - ./data:/app/data
- ./instance:/app/instance
- ./logs:/app/logs - ./logs:/app/logs
# - ./formeleon.db:/app/formeleon.db # - ./formeleon.db:/app/formeleon.db
env_file: env_file: