fajerbejs.

This commit is contained in:
Hubert Dwornik 2024-06-17 01:54:16 +02:00
parent 7e6ec799e6
commit 8704dea10e
6 changed files with 43 additions and 2 deletions

View File

@ -1,4 +1,4 @@
flask==3.0.3
psycopg2==2.9.9
pandas==2.2.2
Flask-Caching==2.3.0
Flask-Caching==2.3.0

22
backend/Dockerfile Normal file
View File

@ -0,0 +1,22 @@
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory to /app
WORKDIR /app
# Install necessary OS packages
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy the Python script, requirements, and constants.ini file into the container at /app
COPY ./app.py /app/
COPY requirements.txt .
COPY .env .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Run frontend_AI_connector.py when the container launches
CMD ["python", "./app.py"]

View File

@ -197,3 +197,5 @@ def get_rating():
except Exception as e:
print(e)
return jsonify({'message': str(e)}), 500
app.run(host="0.0.0.0", port=8084)

8
backend/requirements.txt Normal file
View File

@ -0,0 +1,8 @@
flask==3.0.3
psycopg2==2.9.9
pandas==2.2.2
Flask-Caching==2.3.0
Flask-SQLAlchemy==3.1.1
firebase-admin==6.5.0
python-dotenv==1.0.1
requests==2.3.2

View File

@ -77,6 +77,15 @@ services:
- db
networks:
- my-bridge-network
firebase:
container_name: firebase
build: .
ports:
- "8084:8084"
depends_on:
- db
networks:
- my-bridge-network

View File

@ -2,7 +2,7 @@
FROM python:3.10-slim
# Set the working directory to /app2
WORKDIR /app2
WORKDIR /app
# Install necessary OS packages
RUN apt-get update && apt-get install -y --no-install-recommends \