mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 18:03:14 +02:00
fajerbejs.
This commit is contained in:
parent
7e6ec799e6
commit
8704dea10e
@ -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
22
backend/Dockerfile
Normal 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"]
|
||||
@ -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
8
backend/requirements.txt
Normal 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
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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 \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user