mirror of
https://github.com/aljazceru/payments-rest-api.git
synced 2025-12-21 15:34:22 +01:00
documentation updates, dockerfile fix
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
@@ -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"]
|
||||
CMD ["/app/venv/bin/uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
@@ -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 <your.email@example.com>"]
|
||||
authors = ["Aljaz Ceru <aljaz@ceru.si>"]
|
||||
readme = "README.md"
|
||||
package-mode = false
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
fastapi
|
||||
breez-sdk-liquid
|
||||
python-dotenv
|
||||
|
||||
uvicorn
|
||||
requests
|
||||
Reference in New Issue
Block a user