doc.dev1x.org

sqlite-web

1. sqlite-webとは

2. 導入手順(Docker)

ファイル構成

$ tree
.
├── Dockerfile
├── docker-compose.yaml
└── test.db

Dockerfile

FROM python:3.12

WORKDIR /data

RUN pip install sqlite-web

docker-compose.yaml

version: '3.8'
services:
  sqlite-web:
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      - SQLITE_WEB_PASSWORD=password
    ports:
      - 8080:8080
    command: ["sqlite_web", "-H0.0.0.0", "-p8080", "/data/test.db"]
    volumes:
      - type: bind
        source: "."
        target: "/data"

実行

$ docker compose up

参考資料