diff --git a/analytics/requirements.txt b/analytics/requirements.txt index ef7d9122..a06412d3 100644 --- a/analytics/requirements.txt +++ b/analytics/requirements.txt @@ -1,4 +1,4 @@ flask==3.0.3 psycopg2==2.9.9 pandas==2.2.2 -Flask-Caching==2.3.0 \ No newline at end of file +Flask-Caching==2.3.0 diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 00000000..a173b837 --- /dev/null +++ b/backend/Dockerfile @@ -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"] \ No newline at end of file diff --git a/backend/app.py b/backend/app.py index 94743d52..cc06df10 100644 --- a/backend/app.py +++ b/backend/app.py @@ -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) diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 00000000..24c30506 --- /dev/null +++ b/backend/requirements.txt @@ -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 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 06762ab8..df51918c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/movie_recommendations/Dockerfile b/movie_recommendations/Dockerfile index cbb593ef..8da754ce 100644 --- a/movie_recommendations/Dockerfile +++ b/movie_recommendations/Dockerfile @@ -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 \