documentation updates, dockerfile fix

This commit is contained in:
2025-05-27 19:26:34 +02:00
parent df285efb00
commit 8939599ba8
4 changed files with 26 additions and 25 deletions

View File

@@ -28,10 +28,10 @@
1. Build the Docker image: 1. Build the Docker image:
```bash ```bash
docker build -t breez-nodeless . docker build -t payments-rest-api .
``` ```
2. Run the container: 2. Run the container:
```bash ```bash
docker run -p 8000:8000 --env-file .env breez-nodeless docker run -p 8000:8000 --env-file .env payments-rest-api
``` ```

View File

@@ -3,36 +3,36 @@ FROM python:3.12
WORKDIR /app WORKDIR /app
# Install system dependencies and Python 3.12 # Install system dependencies and Python 3.12
RUN apt-get update && apt-get install -y --no-install-recommends \ #RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \ # build-essential \
libpq-dev \ # libpq-dev \
curl \ # curl \
python3 \ # python3 \
python3-venv \ # python3-venv \
python3-pip \ # python3-pip \
python3-full \ # python3-full \
&& apt-get clean \ # python-is-python3 \
&& rm -rf /var/lib/apt/lists/* # && apt-get clean \
# && rm -rf /var/lib/apt/lists/*
# Set python and pip alternatives # Set python and pip alternatives
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 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 # update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
# Create a virtual environment # Create a virtual environment
RUN python3 -m venv /app/venv RUN python3 -m venv /app/venv
COPY requirements.txt .
# Install Poetry in the virtual environment # Install Poetry in the virtual environment
RUN /app/venv/bin/pip install poetry RUN /app/venv/bin/pip install poetry
RUN /app/venv/bin/pip install -r requirements.txt
# Copy project files # Copy project files
COPY fly/pyproject.toml . COPY pyproject.toml .
COPY fly/main.py . COPY main.py .
COPY nodeless.py . COPY nodeless.py .
# Copy environment file template # Copy environment file template
COPY fly/.env.example .env COPY .env.example .env
# Create a README.md file if it doesn't exist to satisfy Poetry
RUN touch README.md
# Install dependencies using the virtual environment's pip # Install dependencies using the virtual environment's pip
RUN /app/venv/bin/poetry install --no-interaction --no-ansi --no-root RUN /app/venv/bin/poetry install --no-interaction --no-ansi --no-root

View File

@@ -1,8 +1,8 @@
[tool.poetry] [tool.poetry]
name = "breez-fastapi" name = "payments-rest-api"
version = "0.1.0" version = "0.1.0"
description = "A FastAPI implementation of Breez SDK for Lightning/Liquid payments" description = "A FastAPI implementation of Breez SDK for Lightning/Liquid payments"
authors = ["Your Name <your.email@example.com>"] authors = ["Aljaz Ceru <aljaz@ceru.si>"]
readme = "README.md" readme = "README.md"
package-mode = false package-mode = false

View File

@@ -1,4 +1,5 @@
fastapi fastapi
breez-sdk-liquid breez-sdk-liquid
python-dotenv python-dotenv
uvicorn
requests