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
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:
@@ -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:
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
django==6.0.4
|
||||
gunicorn==23.0.0
|
||||
pyswisseph==2.10.3.2
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user