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 \ nginx \
&& apt-get clean && apt-get clean
RUN pip3 install --no-cache-dir Flask PyMuPDF RUN pip3 install --no-cache-dir Flask PyMuPDF Flask-Cors
WORKDIR /app WORKDIR /app

2
ec2.py
View File

@ -28,7 +28,7 @@ cd aws_faktury
docker build -t flask-invoice-app . 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" echo "Aplikacja działa na porcie 8080"
""" """

View File

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