Skip to content

Commit

Permalink
feat: Update DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
kamajus committed Mar 17, 2024
1 parent fda45a4 commit 8e9799b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#
FROM python:3.9
FROM python:3.10

#
WORKDIR /code

#
COPY ./requirements.txt /code/requirements.txt

#
# Install Project dependencies
RUN pip install --root-user-action=ignore --no-cache-dir --upgrade -r /code/requirements.txt

# Install Weasyprint dependencies
RUN apt install libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 libffi-dev libjpeg-dev libopenjp2-7-dev
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

#
COPY . .
Expand Down
2 changes: 2 additions & 0 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from api.utils.secure import get_api_key
from api.utils.invoice import render_template
from api.settings import *

from fastapi.templating import Jinja2Templates
from fastapi.middleware.cors import CORSMiddleware
import datetime
Expand All @@ -35,6 +36,7 @@
templates = Jinja2Templates(directory="/tmp/")



@app.get("/invoice/{order_id}")
async def invoice(order_id: str, _=Security(get_api_key)):
ref = db.reference(f"/orders/{order_id}")
Expand Down

0 comments on commit 8e9799b

Please sign in to comment.