wired PySwiss microservice deployment: env-driven settings, gunicorn pinned, PYSWISS_URL in main settings, test-pyswiss CI stage
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-04-13 21:55:58 -04:00
parent 8c711ac674
commit cc2ab869f1
4 changed files with 19 additions and 3 deletions

View File

@@ -60,6 +60,18 @@ steps:
when:
- event: push
- name: test-pyswiss
image: python:3.13-slim
environment:
SWISSEPH_PATH: /tmp/ephe
commands:
- apt-get update -qq && apt-get install -y -q gcc g++
- pip install -r pyswiss/requirements.txt
- cd ./pyswiss
- python manage.py test apps.charts
when:
- event: push
- name: screendumps
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
commands:

View File

@@ -3,9 +3,9 @@ from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'pyswiss-dev-only-key-replace-in-production'
DEBUG = True
ALLOWED_HOSTS = ['*']
SECRET_KEY = os.environ.get('SECRET_KEY', 'pyswiss-dev-only-key-replace-in-production')
DEBUG = os.environ.get('DEBUG', 'true').lower() != 'false'
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '*').split(',')
INSTALLED_APPS = [
'django.contrib.contenttypes',

View File

@@ -1,2 +1,3 @@
django==6.0.4
gunicorn==23.0.0
pyswisseph==2.10.3.2

View File

@@ -221,6 +221,9 @@ MAILGUN_DOMAIN = "howdy.earthmanrpg.com" # Your Mailgun domain
STRIPE_PUBLISHABLE_KEY = os.environ.get("STRIPE_PUBLISHABLE_KEY", "")
STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "")
# PySwiss ephemeris microservice
PYSWISS_URL = os.environ.get("PYSWISS_URL", "http://127.0.0.1:8001")
if 'test' in sys.argv:
import shutil
_cache_dir = BASE_DIR / 'static' / 'CACHE'