diff --git a/project/.env.template b/project/.env.template new file mode 100644 index 0000000..7be0ac1 --- /dev/null +++ b/project/.env.template @@ -0,0 +1,4 @@ +API_KEY= +DATABASE_URL=postgresql://admin:admin@db:5432 +POSTGRES_PASSWORD=admin +POSTGRES_USER=admin diff --git a/project/backend/coordinator/Dockerfile b/project/Dockerfile similarity index 61% rename from project/backend/coordinator/Dockerfile rename to project/Dockerfile index 17c32dd..979c701 100644 --- a/project/backend/coordinator/Dockerfile +++ b/project/Dockerfile @@ -4,16 +4,18 @@ FROM python:3.11-alpine # 2. Arbeitsverzeichnis im Container setzen WORKDIR /app -# 3. requirements.txt kopieren und Pakete installieren +# 3. production-style server mit gunicorn +RUN pip install gunicorn + +# 4. requirements.txt kopieren und Pakete installieren COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -# 4. Quellcode kopieren (z. B. app.py) + +# 5. Quellcode kopieren (z.B. app.py) COPY . . -# 5. Flask-App starten -# production-style server mit gunicorn -RUN pip install gunicorn +ENV PYTHONUNBUFFERED=1 +EXPOSE 5000 CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"] - diff --git a/project/backend/exxetaGPT/Dockerfile b/project/backend/exxetaGPT/Dockerfile deleted file mode 100644 index e92f8f5..0000000 --- a/project/backend/exxetaGPT/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM python:3.11-slim - -WORKDIR /app - -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -COPY . . - -ENV PYTHONUNBUFFERED=1 - -EXPOSE 5050 - -CMD ["python", "app.py"] \ No newline at end of file diff --git a/project/backend/spacy-service/Dockerfile b/project/backend/spacy-service/Dockerfile index c41372d..6b5dcde 100644 --- a/project/backend/spacy-service/Dockerfile +++ b/project/backend/spacy-service/Dockerfile @@ -7,11 +7,13 @@ RUN apt-get update && apt-get install -y \ build-essential \ && rm -rf /var/lib/apt/lists/* -COPY .. /app +COPY requirements.txt /app RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt RUN python -m spacy download en_core_web_sm +COPY .. /app + CMD ["python3.12", "app.py"] diff --git a/project/backend/spacy-service/services/__pycache__/extract.cpython-312.pyc b/project/backend/spacy-service/services/__pycache__/extract.cpython-312.pyc deleted file mode 100644 index 063eba4..0000000 Binary files a/project/backend/spacy-service/services/__pycache__/extract.cpython-312.pyc and /dev/null differ diff --git a/project/docker-compose.yml b/project/docker-compose.yml new file mode 100644 index 0000000..e4877ba --- /dev/null +++ b/project/docker-compose.yml @@ -0,0 +1,44 @@ +services: + frontend: + build: + context: frontend + ports: + - 8080:80 + db: + image: postgres:17-alpine + env_file: + - .env + # ports: + # - "5432:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U admin"] + interval: 10s + timeout: 5s + retries: 5 + + coordinator: + build: + context: backend/coordinator + dockerfile: ../../Dockerfile + env_file: + - .env + depends_on: + - db + healthcheck: + test: wget --spider --no-verbose http://127.0.0.1:5000/health || exit 1 + interval: 10s + timeout: 5s + retries: 5 + ports: + - 5000:5000 + + spacy: + build: + context: backend/spacy-service + + exxeta: + build: + context: backend/exxetaGPT + dockerfile: ../../Dockerfile + env_file: + - .env diff --git a/project/frontend/bun.lockb b/project/frontend/bun.lockb index 6561d45..68a7bd3 100755 Binary files a/project/frontend/bun.lockb and b/project/frontend/bun.lockb differ