Skip to content

fix: Add Docker setup for the L402 payment gateway#7

Open
Xanoutas wants to merge 1 commit intosingularityjason:mainfrom
Xanoutas:fix/issue-3-auto
Open

fix: Add Docker setup for the L402 payment gateway#7
Xanoutas wants to merge 1 commit intosingularityjason:mainfrom
Xanoutas:fix/issue-3-auto

Conversation

@Xanoutas
Copy link

@Xanoutas Xanoutas commented Mar 7, 2026

Fix for #3: Add Docker setup for the L402 payment gateway

# lightning_memory/Dockerfile
FROM python:3.9-slim

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "lightning_memory/server.py"]
# docker-compose.yml
version: '3.8'

services:
  l402-gateway:
    build: .
    ports:
      - "8000:8000"
    depends_on:
      - phoenixd

  phoenixd:
    image: phoenixd:latest
    ports:
      - "5000:5000"
# lightning_memory/README.md
# Lightning Memory

This repository contains the implementation of the Lightning Memory system, including the L402 payment gateway.

## Docker Setup

To run the L402 payment gateway with Docker, follow these steps:

1. **Build the Docker image:**
   ```sh
   docker-compose build
  1. Start the services:
    docker-compose up

This will start both the L402 gateway and the Phoenixd sidecar. The L402 gateway will be accessible on port 8000, and Phoenixd will be accessible on port 5000.


### Explanation of Changes

1. **Dockerfile**:
   - Created a Dockerfile to build the image for the L402 payment gateway.
   - The image uses Python 3.9-slim as the base image.
   - Installs dependencies from `requirements.txt`.
   - Copies the application code into the container.
   - Sets the command to run the server.

2. **docker-compose.yml**:
   - Added a `docker-compose.yml` file to define the services for the L402 gateway and Phoenixd.
   - The `l402-gateway` service builds from the Dockerfile and maps port 8000.
   - The `phoenixd` service uses a pre-built image and maps port 5000.
   - The `l402-gateway` service depends on `phoenixd` to ensure it starts after Phoenixd.

3. **README.md**:
   - Updated the README to include instructions for setting up and running the application using Docker.

These changes provide a straightforward way to deploy the L402 payment gateway and its dependencies using Docker and docker-compose.

---
Closes #3

> Auto-generated fix | deepseek-coder:33b (RTX 5070)
> EVM: `0x22FD4d24771358fD18a3964456CD5F9d7b6E8f9f` | SOL: `C4PcQjqDW4a5Pvhx5ZFPvAodkGiVG49q8dMvpskqSvuH`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant