This commit is contained in:
dzikafoczka 2024-12-22 18:57:41 +01:00
parent 0ad7dac30a
commit 9b4d51c256
3 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,7 @@ RUN apt-get update && apt-get upgrade -y \
nginx \
&& apt-get clean
RUN pip3 install --no-cache-dir Flask PyMuPDF
RUN pip3 install --no-cache-dir Flask PyMuPDF Flask-Cors
WORKDIR /app

2
ec2.py
View File

@ -28,7 +28,7 @@ cd aws_faktury
docker build -t flask-invoice-app .
docker run -d -p 8080:8080 flask-invoice-app
docker run -d -p 8080:8080 -p 80:80 flask-invoice-app
echo "Aplikacja działa na porcie 8080"
"""

View File

@ -1,9 +1,11 @@
from flask import Flask, request, jsonify
from flask_cors import CORS
import fitz
import os
import re
app = Flask(__name__)
CORS(app)
UPLOAD_FOLDER = 'uploads'
os.makedirs(UPLOAD_FOLDER, exist_ok=True)