Deploy with Docker

Publish the web version of ERPSqlite on your own server or local network. The image builds the app with Flutter and serves it with nginx; it needs no database or other services.

1Requirements

Docker with Docker Compose (Docker Desktop on Windows and macOS, or Docker Engine on Linux) and about 3 GB free for the build.

2Get the code

ERPSqlite’s source code is private. Ask us for access to deploy it with Docker, then open its folder:

cd erp-sqlite

3Build and start

docker compose up -d --build

The first build takes several minutes. Then open http://localhost:8080 (or the server’s IP) and sign in with user demo and password demo.

4Change the port or the path

The port is set in docker-compose.yml:

services:
  erpsqlite:
    build: .
    ports:
    - "80:80"   # server port : container port

To serve it under a subpath (for example /erp/) behind a proxy that strips that prefix, build with:

docker compose build --build-arg BASE_HREF=/erp/
docker compose up -d

5Ship an update

When a new version is out (the installed version is shown at the bottom left of the app’s main menu), update the code on the server and rebuild the image. The container is replaced in a few seconds:

cd erp-sqlite
git pull                         # get the new version
docker compose up -d --build     # rebuild the image and restart the container
docker image prune -f            # optional: remove old images

Data is not touched: each user keeps it in their browser. They get the new version when they reload the page; if someone still sees the old one, a hard reload is enough (Ctrl+Shift+R or Cmd+Shift+R).

6Update from an image registry (optional)

If you build on your computer or in CI and the server only pulls the image, tag it with the version and push it to a registry (Docker Hub, GitHub Container Registry…):

# On your computer or in CI
docker build -t ghcr.io/<user>/erpsqlite-web:1.1.0 .
docker push ghcr.io/<user>/erpsqlite-web:1.1.0

On the server, use the image instead of build and change the tag on each update:

# docker-compose.yml on the server
services:
  erpsqlite:
    image: ghcr.io/<user>/erpsqlite-web:1.1.0
    ports:
    - "8080:80"
    restart: unless-stopped
docker compose pull && docker compose up -d

To roll back, set the previous tag (for example 1.0.0) and run docker compose up -d again.

7Without Docker Compose

docker build -t erpsqlite-web .
docker run -d --name erpsqlite -p 8080:80 --restart unless-stopped erpsqlite-web

Where the data is stored

The web version stores the SQLite database in each user’s browser. The container only serves the app: it stores no data, needs no volume, and each browser has its own database (data is not shared between computers). If the site data is cleared in the browser, that database is lost.

Email (IMAP, POP and SMTP) needs the desktop app: browsers don’t allow those connections. To work with a single data file, use the desktop version.

On a public server, publish it over HTTPS behind your usual proxy (Caddy, Traefik or nginx).