Skip to content

Commit a765f26

Browse files
committed
feat: Rework server to FastAPI and add new astrology calculations
1 parent 921e2b2 commit a765f26

4 files changed

Lines changed: 405 additions & 170 deletions

File tree

flatlib_server/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
FROM python:3.11-slim
22

3-
RUN apt update && apt install -y gcc build-essential libffi-dev zlib1g-dev
3+
RUN apt-get update && apt-get install -y \
4+
gcc \
5+
build-essential \
6+
libffi-dev \
7+
zlib1g-dev \
8+
libgmp-dev \
9+
&& apt-get clean \
10+
&& rm -rf /var/lib/apt/lists/*
411

512
RUN pip install --upgrade pip
613

7-
RUN pip install flatlib==0.2.3 pyswisseph==2.8.0.post1 flask
14+
RUN pip install flatlib==0.2.3 pyswisseph==2.8.0.post1 fastapi uvicorn[standard] python-dateutil
815

916
WORKDIR /app
1017

11-
COPY main.py .
18+
COPY . .
1219

13-
CMD ["python", "main.py"]
20+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]

flatlib_server/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Flatlib Natal Chart API",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"slug": "flatlib_server",
55
"description": "Home Assistant Add-on: Local API for Flatlib Natal Chart and Transit Calculations.",
66
"startup": "application",

0 commit comments

Comments
 (0)