diff --git a/fly/DEV.md b/fly/DEV.md index ec79e2a..2611716 100644 --- a/fly/DEV.md +++ b/fly/DEV.md @@ -28,10 +28,10 @@ 1. Build the Docker image: ```bash - docker build -t breez-nodeless . + docker build -t payments-rest-api . ``` 2. Run the container: ```bash - docker run -p 8000:8000 --env-file .env breez-nodeless + docker run -p 8000:8000 --env-file .env payments-rest-api ``` diff --git a/fly/Dockerfile b/fly/Dockerfile index dd4eb56..104fede 100644 --- a/fly/Dockerfile +++ b/fly/Dockerfile @@ -3,36 +3,36 @@ FROM python:3.12 WORKDIR /app # Install system dependencies and Python 3.12 -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - libpq-dev \ - curl \ - python3 \ - python3-venv \ - python3-pip \ - python3-full \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +#RUN apt-get update && apt-get install -y --no-install-recommends \ +# build-essential \ +# libpq-dev \ +# curl \ +# python3 \ +# python3-venv \ +# python3-pip \ +# python3-full \ +# python-is-python3 \ +# && apt-get clean \ +# && rm -rf /var/lib/apt/lists/* # Set python and pip alternatives -RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \ - update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 +#RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \ +# update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 # Create a virtual environment RUN python3 -m venv /app/venv - +COPY requirements.txt . # Install Poetry in the virtual environment RUN /app/venv/bin/pip install poetry +RUN /app/venv/bin/pip install -r requirements.txt + # Copy project files -COPY fly/pyproject.toml . -COPY fly/main.py . +COPY pyproject.toml . +COPY main.py . COPY nodeless.py . # Copy environment file template -COPY fly/.env.example .env - -# Create a README.md file if it doesn't exist to satisfy Poetry -RUN touch README.md +COPY .env.example .env # Install dependencies using the virtual environment's pip RUN /app/venv/bin/poetry install --no-interaction --no-ansi --no-root @@ -48,4 +48,4 @@ ENV PYTHONUNBUFFERED=1 ENV PATH="/app/venv/bin:$PATH" # Run the application (now using the venv's Python) -CMD ["/app/venv/bin/uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file +CMD ["/app/venv/bin/uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/fly/pyproject.toml b/fly/pyproject.toml index 0b10e0d..f59a681 100644 --- a/fly/pyproject.toml +++ b/fly/pyproject.toml @@ -1,8 +1,8 @@ [tool.poetry] -name = "breez-fastapi" +name = "payments-rest-api" version = "0.1.0" description = "A FastAPI implementation of Breez SDK for Lightning/Liquid payments" -authors = ["Your Name "] +authors = ["Aljaz Ceru "] readme = "README.md" package-mode = false diff --git a/fly/requirements.txt b/fly/requirements.txt index 2982587..4b87147 100644 --- a/fly/requirements.txt +++ b/fly/requirements.txt @@ -1,4 +1,5 @@ fastapi breez-sdk-liquid python-dotenv - +uvicorn +requests \ No newline at end of file