Files
dnsmasq-admin/docker-compose.yml
T
jamo.siu@gmail.com 1e4f028685 refactor(db): switch records layer to Prisma
- Replace hand-written node:sqlite queries with a Prisma client using
  the better-sqlite3 driver adapter
- Version the schema with migrations: baseline table, timestamp
  normalisation, and WAL journal mode
- Store timestamps with an explicit UTC offset so they stop being parsed
  as local time
- Show created/updated times on the edit page, formatted with dayjs
- Move the root redirect into next.config to avoid a prerender error
- Run migrations from the container entrypoint before starting the server

BREAKING CHANGE: DNSMASQ_ADMIN_DB_PATH is replaced by DATABASE_URL, which
must be a Prisma connection URL (file:./data/dnsmasq-admin.db). Existing
database files are migrated in place and need no conversion.
2026-10-12 14:27:03 +08:00

42 lines
1.4 KiB
YAML

services:
# If you already run dnsmasq elsewhere, you can delete this service and simply mount the
# dnsmasq-conf volume at /etc/dnsmasq.d inside your existing container.
dnsmasq:
image: jpillora/dnsmasq
container_name: dnsmasq
cap_add:
- NET_ADMIN
ports:
- "53:53/udp"
volumes:
- dnsmasq-conf:/etc/dnsmasq.d
restart: unless-stopped
web:
build: .
ports:
- "3000:3000"
environment:
# Must be an absolute path inside the container now: Prisma resolves relative sqlite
# paths against the working directory, and the Prisma CLI does not inherit Next's
# path handling.
DATABASE_URL: file:/data/dnsmasq-admin.db
# Same mounted config directory dnsmasq reads from.
DNSMASQ_ADMIN_CONF_PATH: /etc/dnsmasq.d/dnsmasq-admin.conf
DNSMASQ_CONTAINER_NAME: dnsmasq
DNSMASQ_ADMIN_DOCKER_SOCKET: /var/run/docker.sock
# Composed DNS name of the dnsmasq service; use its LAN IP if it lives elsewhere.
DNSMASQ_SERVER_IP: dnsmasq
volumes:
# Shared with the dnsmasq container so the generated config is visible to it.
- dnsmasq-conf:/etc/dnsmasq.d
# Holds the SQLite database — keep this volume or you lose all records.
- app-data:/data
# Used only to restart the dnsmasq container after an apply.
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
volumes:
dnsmasq-conf:
app-data: