Skip to content

Files

Latest commit

ae85f15 · Dec 30, 2024

History

History
This branch is 9 commits ahead of superfly/litefs-example:main.

docker-config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 30, 2024
Jun 26, 2023
Jun 26, 2023

LiteFS Example Application with Docker

Prerequisites

You need to install Docker (and docker-compose, which is included in all recent releases of Docker).

Usage

Running the app

You can run the application with this command (from the top-level directory of the repo):

docker-compose up

Using the app locally

The app is configured with the following containers:

  • primary - this is the application with LiteFS running as primary (all writes happen on this node)
  • replica1 - this is the application running with LiteFS as a replica
  • nginx - nginx configured as a load balancer, and also configured to route all POST requests to the primary node

Each of these is available to test out locally:

You can test generating records on each node (it will fail if attempted on the replica).