This commit is contained in:
2026-01-25 15:08:41 +01:00
parent 9b54db2065
commit f13673ec0d
4 changed files with 8 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
FROM python:3.9-slim FROM python:3.9-slim
WORKDIR /app WORKDIR /app
RUN mkdir -p /app/data
COPY requirements.txt . COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt

View File

@@ -2,7 +2,7 @@ from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import sessionmaker
SQLALCHEMY_DATABASE_URL = "sqlite:///./sso.db" SQLALCHEMY_DATABASE_URL = "sqlite:////app/data/sso.db"
engine = create_engine( engine = create_engine(
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}

View File

@@ -1,5 +1,10 @@
#!/bin/bash #!/bin/bash
# Build and start the container
# Stop and remove old container and volume to ensure clean state
docker-compose down -v
docker rm -f sso_service || true
# Build and start the container # Build and start the container
docker-compose up -d --build docker-compose up -d --build

View File

@@ -8,7 +8,7 @@ services:
ports: ports:
- "8001:8001" - "8001:8001"
volumes: volumes:
- sso_data:/app/backend - sso_data:/app/data
environment: environment:
- SMTP_ADDRESS=smtp.gmail.com - SMTP_ADDRESS=smtp.gmail.com
- SMTP_PORT=587 - SMTP_PORT=587