Docker AIO: a folder name without a space in it
The all-in-one folder is now Docker-AIO, so -f Docker-AIO/Dockerfile resolves without quoting. Every path that pointed at the old name follows it: the compose build stanza, the documented build commands, and the links from the two READMEs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
cc1dafa9f7
commit
9487de84b0
@@ -0,0 +1,41 @@
|
||||
# Copy to .env and fill in. Used by the Docker-AIO docker-compose.yml.
|
||||
|
||||
# --- Required (no defaults) --------------------------------------------------
|
||||
# PocketBase superuser, also used by the API Server to authenticate.
|
||||
PB_ADMIN_EMAIL=admin@example.com
|
||||
PB_ADMIN_PASSWORD=change-me-long-password
|
||||
|
||||
# --- DriverVault super-admin (app login) -------------------------------------
|
||||
# The first application user, created by the API Server on boot with role
|
||||
# "superadmin" if no user with this email exists yet. Leave blank to skip.
|
||||
DRIVERVAULT_SUPERADMIN_EMAIL=owner@example.com
|
||||
DRIVERVAULT_SUPERADMIN_PASSWORD=change-me-long-password
|
||||
DRIVERVAULT_SUPERADMIN_NAME=Administrator
|
||||
|
||||
# Set to false to skip schema creation/reconcile once the database is set up.
|
||||
PB_BOOTSTRAP=true
|
||||
|
||||
# Allowed CORS origin(s) — match your web origin / WEB_PORT.
|
||||
CORS_ALLOW_ORIGINS=http://localhost:8090
|
||||
|
||||
# --- EV charging control (Anker Solix, OCPP) ---------------------------------
|
||||
# Only relevant when a charger is set to own/proxy control mode. The charger
|
||||
# dials in to /ocpp/{serial} on the API Server port, carrying its control token
|
||||
# in an OCPP Basic-auth header — which a plaintext ws:// would expose, so
|
||||
# non-TLS connections are rejected by default. This image serves plain HTTP:
|
||||
# either terminate TLS in front of it and set OCPP_PUBLIC_URL to the public
|
||||
# wss:// base, or set OCPP_REQUIRE_TLS=false on a trusted network.
|
||||
OCPP_REQUIRE_TLS=true
|
||||
OCPP_PUBLIC_URL=
|
||||
|
||||
# --- Host port mappings (optional; defaults shown) --------------------------
|
||||
WEB_PORT=8090
|
||||
PB_PORT=8070
|
||||
# API Server + its embedded web panel (served at the API root, http://host:8080/).
|
||||
API_PORT=8080
|
||||
|
||||
# --- Build args (optional) ---------------------------------------------------
|
||||
# Leave empty so the browser uses same-origin /api (proxied by nginx).
|
||||
VITE_API_BASE=
|
||||
# Pin a PocketBase version, or leave empty to fetch the latest at build time.
|
||||
PB_VERSION=
|
||||
@@ -0,0 +1,50 @@
|
||||
# DriverVault all-in-one — production config.
|
||||
# Copy to .env and fill in, then:
|
||||
# docker compose -f docker-compose.prod.yml pull
|
||||
# docker compose -f docker-compose.prod.yml up -d
|
||||
|
||||
# --- Registry image ----------------------------------------------------------
|
||||
AIO_IMAGE=10.2.1.10:5500/admin/drivervault-aio:latest
|
||||
|
||||
# --- PocketBase superuser (required) -----------------------------------------
|
||||
# Created/updated on first boot. The API Server uses these to manage the database.
|
||||
PB_ADMIN_EMAIL=admin@example.com
|
||||
PB_ADMIN_PASSWORD=change-me-long-password
|
||||
|
||||
# --- DriverVault super-admin (app login) -------------------------------------
|
||||
# The first application user, created by the API Server on boot with role
|
||||
# "superadmin" if no user with this email exists yet. Leave blank to skip.
|
||||
DRIVERVAULT_SUPERADMIN_EMAIL=owner@example.com
|
||||
DRIVERVAULT_SUPERADMIN_PASSWORD=change-me-long-password
|
||||
DRIVERVAULT_SUPERADMIN_NAME=Administrator
|
||||
|
||||
# Set to false to skip schema creation/reconcile once the database is set up.
|
||||
PB_BOOTSTRAP=true
|
||||
|
||||
# Allowed CORS origin(s) — match your public web URL / WEB_PORT.
|
||||
CORS_ALLOW_ORIGINS=http://localhost:8090
|
||||
|
||||
# --- EV charging control (Anker Solix, OCPP) ---------------------------------
|
||||
# Only relevant when a charger is set to own/proxy control mode. The charger
|
||||
# dials in to /ocpp/{serial} on the API Server port, carrying its control token
|
||||
# in an OCPP Basic-auth header — which a plaintext ws:// would expose, so
|
||||
# non-TLS connections are rejected by default. This image serves plain HTTP, so
|
||||
# terminate TLS in a reverse proxy in front of it and set OCPP_PUBLIC_URL to the
|
||||
# public wss:// base the charger should be pointed at. Turning the check off is
|
||||
# for trusted networks only.
|
||||
OCPP_REQUIRE_TLS=true
|
||||
OCPP_PUBLIC_URL=
|
||||
|
||||
# --- Host port mappings (optional; defaults shown) --------------------------
|
||||
WEB_PORT=8090
|
||||
PB_PORT=8070
|
||||
API_PORT=8080
|
||||
|
||||
# --- Storage -----------------------------------------------------------------
|
||||
# Defaults are Docker-managed named volumes. Set either to an absolute host path
|
||||
# for a bind mount, e.g. PB_DATA=/srv/drivervault/pb_data.
|
||||
# PB_DATA — the PocketBase database and uploads.
|
||||
# API_DATA — the API Server's plugins.json and the .env the panel writes back
|
||||
# when a superadmin retargets the PocketBase connection.
|
||||
PB_DATA=pb_data
|
||||
API_DATA=api_data
|
||||
@@ -0,0 +1,181 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
#
|
||||
# All-in-one image: PocketBase + API Server + Web App in a single container.
|
||||
#
|
||||
# The build context MUST be the project root so this file can reach both
|
||||
# "API Server/" and "Web App/". Build it with:
|
||||
#
|
||||
# docker build -f "Docker-AIO/Dockerfile" -t drivervault-aio .
|
||||
#
|
||||
# Run it (all three services start together):
|
||||
#
|
||||
# docker run -d --name drivervault -p 80:80 -p 8070:8070 \
|
||||
# -e PB_ADMIN_EMAIL=admin@example.com \
|
||||
# -e PB_ADMIN_PASSWORD=change-me \
|
||||
# -e DRIVERVAULT_SUPERADMIN_EMAIL=owner@example.com \
|
||||
# -e DRIVERVAULT_SUPERADMIN_PASSWORD=change-me \
|
||||
# -v drivervault_pb:/pb/pb_data \
|
||||
# -v drivervault_api:/data \
|
||||
# drivervault-aio
|
||||
#
|
||||
# Then: web app on http://host/ and PocketBase admin on http://host:8070/_/
|
||||
# On first boot the API Server creates the collections and the super-admin.
|
||||
|
||||
# --- Stage 1: build the Go API Server ---------------------------------------
|
||||
FROM golang:1.26-alpine AS api-build
|
||||
WORKDIR /src
|
||||
COPY ["API Server/go.mod", "./"]
|
||||
COPY ["API Server/go.su[m]", "./"]
|
||||
RUN go mod download
|
||||
# Only cmd/ + internal are needed; the panel is already built into
|
||||
# internal/api/dist and embedded via //go:embed. Entry point is cmd/server.
|
||||
COPY ["API Server/cmd", "./cmd"]
|
||||
COPY ["API Server/internal", "./internal"]
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/api-server ./cmd/server
|
||||
|
||||
# --- Stage 2: build the Vue Web App -----------------------------------------
|
||||
# The Vue source lives under "Web App/web/".
|
||||
FROM node:22-alpine AS web-build
|
||||
WORKDIR /app
|
||||
COPY ["Web App/web/package.json", "Web App/web/package-lock.json", "./"]
|
||||
RUN npm ci
|
||||
COPY ["Web App/web/index.html", "Web App/web/vite.config.js", "./"]
|
||||
COPY ["Web App/web/src", "./src"]
|
||||
COPY ["Web App/web/public", "./public"]
|
||||
# Empty -> bundle uses same-origin "/api", proxied to the API Server by nginx.
|
||||
ARG VITE_API_BASE
|
||||
# vite.config writes to ../server/dist by default; emit into ./dist here.
|
||||
RUN npm run build -- --outDir dist --emptyOutDir
|
||||
|
||||
# --- Stage 3: runtime (all services) ----------------------------------------
|
||||
FROM alpine:latest
|
||||
|
||||
ARG PB_VERSION=""
|
||||
ARG TARGETARCH="amd64"
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata unzip wget nginx supervisor \
|
||||
&& mkdir -p /run/nginx
|
||||
|
||||
# PocketBase from the official release (pinned via PB_VERSION, else latest).
|
||||
WORKDIR /pb
|
||||
RUN set -eux; \
|
||||
ver="${PB_VERSION}"; \
|
||||
if [ -z "$ver" ]; then \
|
||||
ver="$(wget -qO- https://api.github.com/repos/pocketbase/pocketbase/releases/latest \
|
||||
| grep -o '"tag_name": *"v[^"]*"' | head -1 | sed -E 's/.*"v([^"]+)".*/\1/')"; \
|
||||
fi; \
|
||||
echo "Installing PocketBase v${ver} (${TARGETARCH})"; \
|
||||
wget -q -O /tmp/pb.zip \
|
||||
"https://github.com/pocketbase/pocketbase/releases/download/v${ver}/pocketbase_${ver}_linux_${TARGETARCH}.zip"; \
|
||||
unzip /tmp/pb.zip -d /pb; \
|
||||
rm /tmp/pb.zip
|
||||
|
||||
# API Server binary + built Web App static assets.
|
||||
COPY --from=api-build /out/api-server /usr/local/bin/api-server
|
||||
COPY --from=web-build /app/dist /usr/share/nginx/html
|
||||
|
||||
# nginx: serve the SPA and proxy /api/ to the API Server on localhost.
|
||||
RUN cat > /etc/nginx/http.d/default.conf <<'NGINX'
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
||||
gzip_min_length 1024;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /assets/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
NGINX
|
||||
|
||||
# supervisord runs the three processes and keeps them alive.
|
||||
RUN cat > /etc/supervisord.conf <<'SUPERVISOR'
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
pidfile=/run/supervisord.pid
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0
|
||||
|
||||
; PocketBase: upsert the superuser (idempotent) then serve.
|
||||
[program:pocketbase]
|
||||
directory=/pb
|
||||
command=/bin/sh -c '/pb/pocketbase superuser upsert "$PB_ADMIN_EMAIL" "$PB_ADMIN_PASSWORD" 2>/dev/null || true; exec /pb/pocketbase serve --http=0.0.0.0:8070'
|
||||
priority=10
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
||||
; API Server: wait for PocketBase to be healthy, then start. It runs from /data
|
||||
; because it writes plugins.json and the panel's .env relative to its working
|
||||
; directory, and /data is the volume that keeps them across container recreates.
|
||||
[program:api-server]
|
||||
directory=/data
|
||||
command=/bin/sh -c 'until wget -qO- http://127.0.0.1:8070/api/health >/dev/null 2>&1; do echo "waiting for pocketbase..."; sleep 1; done; exec /usr/local/bin/api-server'
|
||||
priority=20
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx -g 'daemon off;'
|
||||
priority=30
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
SUPERVISOR
|
||||
|
||||
# API Server config: everything is local to this container.
|
||||
ENV API_ADDR=:8080 \
|
||||
POCKETBASE_URL=http://127.0.0.1:8070 \
|
||||
CORS_ALLOW_ORIGINS=http://localhost:8090 \
|
||||
AUTH_USERS_COLLECTION=users \
|
||||
PLUGINS_FILE=/data/plugins.json
|
||||
|
||||
# Required at runtime (no safe defaults): PB_ADMIN_EMAIL, PB_ADMIN_PASSWORD.
|
||||
# Optional: DRIVERVAULT_SUPERADMIN_EMAIL / DRIVERVAULT_SUPERADMIN_PASSWORD create
|
||||
# the first app super-admin on boot; PB_BOOTSTRAP=false skips schema setup.
|
||||
# For Anker Solix charger control, OCPP_REQUIRE_TLS (default true) rejects
|
||||
# chargers that did not arrive over TLS — this image serves plain HTTP, so put a
|
||||
# TLS-terminating proxy in front and set OCPP_PUBLIC_URL to the public wss://
|
||||
# base, or set OCPP_REQUIRE_TLS=false on a trusted network.
|
||||
# Pass them with `docker run -e ...`.
|
||||
|
||||
RUN mkdir -p /data
|
||||
# pb_data holds the database; /data holds the API Server's plugins.json and the
|
||||
# .env the panel rewrites when a superadmin retargets PocketBase.
|
||||
VOLUME /pb/pb_data
|
||||
VOLUME /data
|
||||
# 80 = Web App, 8070 = PocketBase admin, 8080 = API Server + embedded API panel
|
||||
# (also the /ocpp/{serial} endpoint chargers dial into).
|
||||
EXPOSE 80 8070 8080
|
||||
|
||||
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
|
||||
@@ -0,0 +1,96 @@
|
||||
# DriverVault — Docker AIO (all-in-one image)
|
||||
|
||||
**PocketBase + API Server + Web App in a single container**, supervised by
|
||||
`supervisord` with nginx serving the SPA and proxying `/api/` to the API Server
|
||||
on localhost. One image, one volume set, no compose network — the simplest way
|
||||
to stand DriverVault up on a single host.
|
||||
|
||||
Prefer the three-container stack in [`../Docker`](../Docker) when you want to
|
||||
scale, upgrade or restart the pieces independently.
|
||||
|
||||
```
|
||||
:80 nginx ─► SPA, and /api/ ─► API Server on 127.0.0.1:8080 ─► PocketBase on :8070
|
||||
```
|
||||
|
||||
| File | Use |
|
||||
|---|---|
|
||||
| `Dockerfile` | the all-in-one image (build context must be the **repo root**) |
|
||||
| `docker-compose.yml` | **builds from source** — for development and local testing |
|
||||
| `docker-compose.prod.yml` | **pulls the prebuilt image** from the registry |
|
||||
| `.env.example` / `.env.prod.example` | copy to `.env` for the matching compose file |
|
||||
|
||||
## Run it
|
||||
|
||||
```bash
|
||||
cd "Docker-AIO"
|
||||
cp .env.example .env # then edit — PB_ADMIN_* have no safe defaults
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
Production, from the registry:
|
||||
|
||||
```bash
|
||||
cp .env.prod.example .env # then edit
|
||||
docker compose -f docker-compose.prod.yml pull
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
Then: web app on `http://host:8090/`, the API Server's superadmin panel on
|
||||
`http://host:8080/`, PocketBase admin on `http://host:8070/_/`.
|
||||
|
||||
Note the port mapping: inside the container the web app is on **80**, published
|
||||
as `WEB_PORT` (8090 by default) to line up with the other deployment.
|
||||
|
||||
## Building by hand
|
||||
|
||||
The build context **must be the repo root** so the Dockerfile can reach both
|
||||
`API Server/` and `Web App/`:
|
||||
|
||||
```bash
|
||||
docker build -f "Docker-AIO/Dockerfile" -t drivervault-aio .
|
||||
```
|
||||
|
||||
Build args: `VITE_API_BASE` (leave empty so the bundle uses same-origin `/api`)
|
||||
and `PB_VERSION` (pin PocketBase, or leave empty to fetch the latest release at
|
||||
build time).
|
||||
|
||||
## First boot
|
||||
|
||||
Identical to the multi-container stack, and idempotent:
|
||||
|
||||
1. PocketBase upserts its superuser from `PB_ADMIN_EMAIL` / `PB_ADMIN_PASSWORD`.
|
||||
2. The API Server waits for PocketBase to report healthy, then creates any
|
||||
missing collections, reconciles existing ones, and creates the first app
|
||||
`superadmin` from `DRIVERVAULT_SUPERADMIN_EMAIL` / `_PASSWORD`. Set
|
||||
`PB_BOOTSTRAP=false` to skip once the database is established.
|
||||
|
||||
## Volumes
|
||||
|
||||
| Volume | Holds |
|
||||
|---|---|
|
||||
| `/pb/pb_data` | the PocketBase SQLite database and uploaded files |
|
||||
| `/data` | the API Server's `plugins.json`, and the `.env` the panel rewrites when a superadmin retargets the PocketBase connection |
|
||||
|
||||
Both default to Docker-managed named volumes; set `PB_DATA` / `API_DATA` to
|
||||
absolute host paths in the prod file for bind mounts.
|
||||
|
||||
## Charger control (OCPP)
|
||||
|
||||
Chargers in own/proxy mode dial in to `/ocpp/{serial}` on the **API Server port
|
||||
(8080)** — not through nginx — authenticating with a per-charger control token
|
||||
in an OCPP Basic-auth header. Because a plaintext `ws://` would expose that
|
||||
token, `OCPP_REQUIRE_TLS` defaults to `true`.
|
||||
|
||||
This image serves plain HTTP, so charger control needs TLS terminated in front
|
||||
of it, with `OCPP_PUBLIC_URL` set to the public `wss://` base. Only drop
|
||||
`OCPP_REQUIRE_TLS` on a trusted network.
|
||||
|
||||
## Caveats
|
||||
|
||||
- Everything runs as **root** in one container, and a crash of `supervisord`
|
||||
takes all three services down together. That is the trade for the simplicity.
|
||||
- Logs from all three processes are interleaved on the container's stdout/stderr
|
||||
(`docker logs drivervault-aio`).
|
||||
- `PB_VERSION` empty means the image pulls whatever PocketBase release is latest
|
||||
**at build time**, so two builds of the same source can differ. Pin it for
|
||||
reproducibility.
|
||||
@@ -0,0 +1,51 @@
|
||||
name: drivervault-aio
|
||||
|
||||
# Production all-in-one — pulls the prebuilt image from the registry instead of
|
||||
# building. One container runs PocketBase + API Server + Web App (nginx).
|
||||
# Everything an operator needs to set lives in .env.
|
||||
#
|
||||
# 1. cp .env.prod.example .env (then edit it)
|
||||
# 2. docker compose -f docker-compose.prod.yml pull
|
||||
# 3. docker compose -f docker-compose.prod.yml up -d
|
||||
#
|
||||
# On first boot PocketBase upserts the superuser from PB_ADMIN_*, and the API
|
||||
# Server creates any missing collections and the DriverVault super-admin from
|
||||
# DRIVERVAULT_SUPERADMIN_*. Both steps are idempotent.
|
||||
|
||||
services:
|
||||
drivervault:
|
||||
image: "${AIO_IMAGE:-10.2.1.10:5500/admin/drivervault-aio:latest}"
|
||||
container_name: drivervault-aio
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Superuser (also used by the API Server to authenticate to PocketBase).
|
||||
PB_ADMIN_EMAIL: "${PB_ADMIN_EMAIL:?set PB_ADMIN_EMAIL in .env}"
|
||||
PB_ADMIN_PASSWORD: "${PB_ADMIN_PASSWORD:?set PB_ADMIN_PASSWORD in .env}"
|
||||
# Match CORS to the web origin (only used if a browser calls the API directly).
|
||||
CORS_ALLOW_ORIGINS: "${CORS_ALLOW_ORIGINS:-http://localhost:8090}"
|
||||
# Schema + super-admin bootstrap on boot (idempotent). Set PB_BOOTSTRAP=false
|
||||
# to skip once the database is established.
|
||||
PB_BOOTSTRAP: "${PB_BOOTSTRAP:-true}"
|
||||
DRIVERVAULT_SUPERADMIN_EMAIL: "${DRIVERVAULT_SUPERADMIN_EMAIL:-}"
|
||||
DRIVERVAULT_SUPERADMIN_PASSWORD: "${DRIVERVAULT_SUPERADMIN_PASSWORD:-}"
|
||||
DRIVERVAULT_SUPERADMIN_NAME: "${DRIVERVAULT_SUPERADMIN_NAME:-Administrator}"
|
||||
# OCPP charger control (Anker Solix). This image serves plain HTTP, so a
|
||||
# charger can only connect when TLS is terminated in front of it (set
|
||||
# OCPP_PUBLIC_URL to the public wss:// base) — or, on a trusted network,
|
||||
# with OCPP_REQUIRE_TLS=false.
|
||||
OCPP_REQUIRE_TLS: "${OCPP_REQUIRE_TLS:-true}"
|
||||
OCPP_PUBLIC_URL: "${OCPP_PUBLIC_URL:-}"
|
||||
ports:
|
||||
- "${WEB_PORT:-8090}:80" # Web App
|
||||
- "${PB_PORT:-8070}:8070" # PocketBase admin UI / API
|
||||
- "${API_PORT:-8080}:8080" # API Server + panel (root /) + /ocpp/{serial}
|
||||
volumes:
|
||||
# Named volumes by default; set PB_DATA / API_DATA to host paths in .env
|
||||
# for bind mounts.
|
||||
- "${PB_DATA:-pb_data}:/pb/pb_data"
|
||||
# plugins.json + the .env the panel writes back.
|
||||
- "${API_DATA:-api_data}:/data"
|
||||
|
||||
volumes:
|
||||
pb_data:
|
||||
api_data:
|
||||
@@ -0,0 +1,50 @@
|
||||
name: drivervault-aio
|
||||
|
||||
# Single all-in-one container: PocketBase + API Server + Web App (nginx).
|
||||
# The build context is the project root so the Dockerfile can reach both
|
||||
# "API Server/" and "Web App/". Copy .env.example to .env before starting.
|
||||
|
||||
services:
|
||||
drivervault:
|
||||
build:
|
||||
# Project root (one level up from this compose file).
|
||||
context: ..
|
||||
dockerfile: Docker-AIO/Dockerfile
|
||||
args:
|
||||
# Empty -> bundle uses same-origin "/api", proxied internally by nginx.
|
||||
VITE_API_BASE: "${VITE_API_BASE:-}"
|
||||
# Optional: pin PocketBase; empty fetches the latest release at build.
|
||||
PB_VERSION: "${PB_VERSION:-}"
|
||||
image: drivervault-aio
|
||||
container_name: drivervault-aio
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Superuser (also used by the API Server to authenticate to PocketBase).
|
||||
PB_ADMIN_EMAIL: "${PB_ADMIN_EMAIL:?set PB_ADMIN_EMAIL in .env}"
|
||||
PB_ADMIN_PASSWORD: "${PB_ADMIN_PASSWORD:?set PB_ADMIN_PASSWORD in .env}"
|
||||
# Match CORS to the web origin (only used if a browser calls the API directly).
|
||||
CORS_ALLOW_ORIGINS: "${CORS_ALLOW_ORIGINS:-http://localhost:8090}"
|
||||
# Schema + super-admin bootstrap on boot (idempotent). Set PB_BOOTSTRAP=false
|
||||
# to skip once the database is established.
|
||||
PB_BOOTSTRAP: "${PB_BOOTSTRAP:-true}"
|
||||
DRIVERVAULT_SUPERADMIN_EMAIL: "${DRIVERVAULT_SUPERADMIN_EMAIL:-}"
|
||||
DRIVERVAULT_SUPERADMIN_PASSWORD: "${DRIVERVAULT_SUPERADMIN_PASSWORD:-}"
|
||||
DRIVERVAULT_SUPERADMIN_NAME: "${DRIVERVAULT_SUPERADMIN_NAME:-Administrator}"
|
||||
# OCPP charger control (Anker Solix). This image serves plain HTTP, so a
|
||||
# charger can only connect when TLS is terminated in front of it (set
|
||||
# OCPP_PUBLIC_URL to the public wss:// base) — or, on a trusted network,
|
||||
# with OCPP_REQUIRE_TLS=false.
|
||||
OCPP_REQUIRE_TLS: "${OCPP_REQUIRE_TLS:-true}"
|
||||
OCPP_PUBLIC_URL: "${OCPP_PUBLIC_URL:-}"
|
||||
ports:
|
||||
- "${WEB_PORT:-8090}:80" # Web App
|
||||
- "${PB_PORT:-8070}:8070" # PocketBase admin UI / API
|
||||
- "${API_PORT:-8080}:8080" # API Server + panel (root /) + /ocpp/{serial}
|
||||
volumes:
|
||||
- pb_data:/pb/pb_data
|
||||
# plugins.json + the .env the panel writes back.
|
||||
- api_data:/data
|
||||
|
||||
volumes:
|
||||
pb_data:
|
||||
api_data:
|
||||
Reference in New Issue
Block a user