Move PocketBase to port 8070
CI / go (Server) (push) Successful in 23m34s
CI / go (Web-App) (push) Successful in 12m21s
CI / frontend (push) Failing after 10m55s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Successful in 1h57m19s
CI / mobile (push) Failing after 5m8s
CI / docker (push) Failing after 41m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / go (Server) (push) Successful in 23m34s
CI / go (Web-App) (push) Successful in 12m21s
CI / frontend (push) Failing after 10m55s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Successful in 1h57m19s
CI / mobile (push) Failing after 5m8s
CI / docker (push) Failing after 41m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
docwell-db's base image (tajniak81/pocketbase-docker-root) listens on 8070 by default. Use that port everywhere instead of overriding it to 8090: the Database image, every Docker compose file and .env example, the AIO start script, docwell-server's DOCWELL_PB_URL default, and the docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ad26727521
commit
ef2c81d062
16 files changed
+30
-30
No files matched your search
+3
-3
@@ -15,9 +15,9 @@ FROM ${PB_IMAGE}
|
||||
COPY pb_migrations /pb/pb_migrations
|
||||
COPY pb_hooks /pb/pb_hooks
|
||||
|
||||
# docwell-server expects PocketBase on 8090 (DOCWELL_PB_URL=http://db:8090).
|
||||
# docwell-server expects PocketBase on 8070 (DOCWELL_PB_URL=http://db:8070).
|
||||
# The base image's entrypoint and HEALTHCHECK both read PB_PORT.
|
||||
ENV PB_PORT=8090
|
||||
EXPOSE 8090
|
||||
ENV PB_PORT=8070
|
||||
EXPOSE 8070
|
||||
|
||||
# Inherited: VOLUME /pb/pb_data, HEALTHCHECK on /api/health, ENTRYPOINT.
|
||||
+1
-1
@@ -20,7 +20,7 @@ Download PocketBase v0.40.6 for your OS into `Database/bin/`, then:
|
||||
./bin/pocketbase serve --dir ./pb_data --migrationsDir ./pb_migrations --hooksDir ./pb_hooks
|
||||
```
|
||||
|
||||
The PocketBase dashboard is at http://127.0.0.1:8090/_/.
|
||||
The PocketBase dashboard is at http://127.0.0.1:8070/_/.
|
||||
|
||||
## New migration
|
||||
|
||||
|
||||
+3
-3
@@ -22,19 +22,19 @@ pocketbase migrate up --dir /pb_data --migrationsDir /pb_migrations $ENC
|
||||
pocketbase superuser upsert "$PB_ADMIN_EMAIL" "$PB_ADMIN_PASSWORD" --dir /pb_data $ENC
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
pocketbase serve --http 127.0.0.1:8090 --dir /pb_data \
|
||||
pocketbase serve --http 127.0.0.1:8070 --dir /pb_data \
|
||||
--migrationsDir /pb_migrations --hooksDir /pb_hooks --automigrate=false $ENC &
|
||||
PB_PID=$!
|
||||
|
||||
i=0
|
||||
until wget -qO- http://127.0.0.1:8090/api/health >/dev/null 2>&1; do
|
||||
until wget -qO- http://127.0.0.1:8070/api/health >/dev/null 2>&1; do
|
||||
i=$((i + 1))
|
||||
[ "$i" -gt 50 ] && echo "PocketBase did not start" >&2 && exit 1
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
DOCWELL_ADDR=127.0.0.1:8080 \
|
||||
DOCWELL_PB_URL=http://127.0.0.1:8090 \
|
||||
DOCWELL_PB_URL=http://127.0.0.1:8070 \
|
||||
DOCWELL_PB_EMAIL="$PB_ADMIN_EMAIL" \
|
||||
DOCWELL_PB_PASSWORD="$PB_ADMIN_PASSWORD" \
|
||||
docwell-server &
|
||||
|
||||
@@ -73,7 +73,7 @@ SERVER_BIND=0.0.0.0
|
||||
SERVER_PORT=8080
|
||||
# The PocketBase dashboard (/_/). Loopback only; use an SSH tunnel to reach it.
|
||||
PB_BIND=127.0.0.1
|
||||
PB_PORT=8090
|
||||
PB_PORT=8070
|
||||
|
||||
# --- Storage -----------------------------------------------------------------
|
||||
# Docker-managed named volumes by default; set absolute host paths for bind
|
||||
|
||||
@@ -73,7 +73,7 @@ SERVER_BIND=0.0.0.0
|
||||
SERVER_PORT=8080
|
||||
# The PocketBase dashboard (/_/). Loopback only; use an SSH tunnel to reach it.
|
||||
PB_BIND=127.0.0.1
|
||||
PB_PORT=8090
|
||||
PB_PORT=8070
|
||||
|
||||
# --- Storage -----------------------------------------------------------------
|
||||
# Docker-managed named volumes by default; set absolute host paths for bind
|
||||
|
||||
@@ -73,7 +73,7 @@ SERVER_BIND=0.0.0.0
|
||||
SERVER_PORT=8080
|
||||
# The PocketBase dashboard (/_/). Loopback only; use an SSH tunnel to reach it.
|
||||
PB_BIND=127.0.0.1
|
||||
PB_PORT=8090
|
||||
PB_PORT=8070
|
||||
|
||||
# --- Storage -----------------------------------------------------------------
|
||||
# Docker-managed named volumes by default; set absolute host paths for bind
|
||||
|
||||
@@ -73,7 +73,7 @@ SERVER_BIND=0.0.0.0
|
||||
SERVER_PORT=8080
|
||||
# The PocketBase dashboard (/_/). Loopback only; use an SSH tunnel to reach it.
|
||||
PB_BIND=127.0.0.1
|
||||
PB_PORT=8090
|
||||
PB_PORT=8070
|
||||
|
||||
# --- Storage -----------------------------------------------------------------
|
||||
# Docker-managed named volumes by default; set absolute host paths for bind
|
||||
|
||||
@@ -83,11 +83,11 @@ services:
|
||||
# The PocketBase dashboard (/_/), bound to loopback: every collection is
|
||||
# superuser-only and nothing but docwell-server should talk to it. Reach
|
||||
# it from elsewhere with an SSH tunnel rather than PB_BIND=0.0.0.0.
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8090}:8090"
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8070}:8070"
|
||||
healthcheck:
|
||||
# Declared here as well as in the image, so the depends_on gate below
|
||||
# works against any image tag.
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8090/api/health || exit 1"]
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8070/api/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
@@ -103,7 +103,7 @@ services:
|
||||
environment:
|
||||
# Service name on the compose network. Override DOCWELL_PB_URL in .env to
|
||||
# use a PocketBase outside this stack.
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8090}"
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8070}"
|
||||
DOCWELL_PB_EMAIL: "${PB_ADMIN_EMAIL}"
|
||||
DOCWELL_PB_PASSWORD: "${PB_ADMIN_PASSWORD}"
|
||||
# Where browsers reach this service, and where they reach docwell-web.
|
||||
|
||||
@@ -252,11 +252,11 @@ services:
|
||||
# The PocketBase dashboard (/_/), bound to loopback: every collection is
|
||||
# superuser-only and nothing but docwell-server should talk to it. Reach
|
||||
# it from elsewhere with an SSH tunnel rather than PB_BIND=0.0.0.0.
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8090}:8090"
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8070}:8070"
|
||||
healthcheck:
|
||||
# Declared here as well as in the image, so the depends_on gate below
|
||||
# works against any image tag.
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8090/api/health || exit 1"]
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8070/api/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
@@ -272,7 +272,7 @@ services:
|
||||
environment:
|
||||
# Service name on the compose network. Override DOCWELL_PB_URL in .env to
|
||||
# use a PocketBase outside this stack.
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8090}"
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8070}"
|
||||
DOCWELL_PB_EMAIL: "${PB_ADMIN_EMAIL}"
|
||||
DOCWELL_PB_PASSWORD: "${PB_ADMIN_PASSWORD}"
|
||||
# Where browsers reach this service, and where they reach docwell-web.
|
||||
|
||||
@@ -128,11 +128,11 @@ services:
|
||||
# The PocketBase dashboard (/_/), bound to loopback: every collection is
|
||||
# superuser-only and nothing but docwell-server should talk to it. Reach
|
||||
# it from elsewhere with an SSH tunnel rather than PB_BIND=0.0.0.0.
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8090}:8090"
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8070}:8070"
|
||||
healthcheck:
|
||||
# Declared here as well as in the image, so the depends_on gate below
|
||||
# works against any image tag.
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8090/api/health || exit 1"]
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8070/api/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
@@ -148,7 +148,7 @@ services:
|
||||
environment:
|
||||
# Service name on the compose network. Override DOCWELL_PB_URL in .env to
|
||||
# use a PocketBase outside this stack.
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8090}"
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8070}"
|
||||
DOCWELL_PB_EMAIL: "${PB_ADMIN_EMAIL}"
|
||||
DOCWELL_PB_PASSWORD: "${PB_ADMIN_PASSWORD}"
|
||||
# Where browsers reach this service, and where they reach docwell-web.
|
||||
|
||||
@@ -57,11 +57,11 @@ services:
|
||||
# The PocketBase dashboard (/_/), bound to loopback: every collection is
|
||||
# superuser-only and nothing but docwell-server should talk to it. Reach
|
||||
# it from elsewhere with an SSH tunnel rather than PB_BIND=0.0.0.0.
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8090}:8090"
|
||||
- "${PB_BIND:-127.0.0.1}:${PB_PORT:-8070}:8070"
|
||||
healthcheck:
|
||||
# Declared here as well as in the image, so the depends_on gate below
|
||||
# works against any image tag.
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8090/api/health || exit 1"]
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8070/api/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
@@ -77,7 +77,7 @@ services:
|
||||
environment:
|
||||
# Service name on the compose network. Override DOCWELL_PB_URL in .env to
|
||||
# use a PocketBase outside this stack.
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8090}"
|
||||
DOCWELL_PB_URL: "${DOCWELL_PB_URL:-http://db:8070}"
|
||||
DOCWELL_PB_EMAIL: "${PB_ADMIN_EMAIL}"
|
||||
DOCWELL_PB_PASSWORD: "${PB_ADMIN_PASSWORD}"
|
||||
# Where browsers reach this service, and where they reach docwell-web.
|
||||
|
||||
@@ -28,7 +28,7 @@ services:
|
||||
- pb_data:/pb/pb_data
|
||||
# Private: only docwell-server talks to PocketBase. To open the PocketBase
|
||||
# dashboard during development, uncomment:
|
||||
# ports: ["127.0.0.1:8090:8090"]
|
||||
# ports: ["127.0.0.1:8070:8070"]
|
||||
|
||||
server:
|
||||
image: ${DOCWELL_REGISTRY:-ghcr.io/docwell}/docwell-server:${DOCWELL_VERSION:-latest}
|
||||
@@ -40,7 +40,7 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DOCWELL_PB_URL: http://db:8090
|
||||
DOCWELL_PB_URL: http://db:8070
|
||||
DOCWELL_PB_EMAIL: ${PB_ADMIN_EMAIL}
|
||||
DOCWELL_PB_PASSWORD: ${PB_ADMIN_PASSWORD}
|
||||
DOCWELL_PUBLIC_URL: ${DOCWELL_PUBLIC_URL:-http://localhost:8080}
|
||||
|
||||
@@ -31,7 +31,7 @@ Docwell is configured with environment variables, set in `.env` (separate servic
|
||||
| Variable | Default | What it does |
|
||||
| --- | --- | --- |
|
||||
| `DOCWELL_ADDR` | `:8080` | Listen address. |
|
||||
| `DOCWELL_PB_URL` | `http://127.0.0.1:8090` | Where docwell-db is. Keep it on a private network. |
|
||||
| `DOCWELL_PB_URL` | `http://127.0.0.1:8070` | Where docwell-db is. Keep it on a private network. |
|
||||
| `DOCWELL_PB_EMAIL`, `DOCWELL_PB_PASSWORD` | *(required)* | The PocketBase superuser (`PB_ADMIN_EMAIL`, `PB_ADMIN_PASSWORD`). |
|
||||
| `DOCWELL_PUBLIC_URL` | `http://localhost:8080` | The API's public address. Exported pages link attachments here. |
|
||||
| `DOCWELL_WEB_URL` | `http://localhost:3000` | The web app's address, for invite and share links. |
|
||||
|
||||
@@ -60,4 +60,4 @@ DOCWELL_COLLAB_URL=wss://api.wiki.example.com/collab
|
||||
DOCWELL_CORS_ORIGINS=https://wiki.example.com
|
||||
```
|
||||
|
||||
Never expose docwell-db (port 8090): only docwell-server may talk to it.
|
||||
Never expose docwell-db (port 8070): only docwell-server may talk to it.
|
||||
@@ -62,7 +62,7 @@ func fromLookup(lookup func(string) (string, bool)) (Config, error) {
|
||||
PublicURL: strings.TrimRight(get("DOCWELL_PUBLIC_URL", "http://localhost:8080"), "/"),
|
||||
WebURL: strings.TrimRight(get("DOCWELL_WEB_URL", "http://localhost:3000"), "/"),
|
||||
CORSOrigins: splitList(get("DOCWELL_CORS_ORIGINS", "http://localhost:5173,http://localhost:3000")),
|
||||
PocketBaseURL: strings.TrimRight(get("DOCWELL_PB_URL", "http://127.0.0.1:8090"), "/"),
|
||||
PocketBaseURL: strings.TrimRight(get("DOCWELL_PB_URL", "http://127.0.0.1:8070"), "/"),
|
||||
PocketBaseEmail: get("DOCWELL_PB_EMAIL", ""),
|
||||
PocketBasePassword: get("DOCWELL_PB_PASSWORD", ""),
|
||||
SignupEnabled: get("DOCWELL_SIGNUP_ENABLED", "true") == "true",
|
||||
|
||||
@@ -40,7 +40,7 @@ func TestOverridesAndTrimming(t *testing.T) {
|
||||
cfg, err := fromLookup(lookup(map[string]string{
|
||||
"DOCWELL_PB_EMAIL": "a@b.c",
|
||||
"DOCWELL_PB_PASSWORD": "x",
|
||||
"DOCWELL_PB_URL": "http://db:8090/",
|
||||
"DOCWELL_PB_URL": "http://db:8070/",
|
||||
"DOCWELL_CORS_ORIGINS": " https://a.test , ,https://b.test",
|
||||
"DOCWELL_SHUTDOWN_TIMEOUT": "3s",
|
||||
"DOCWELL_SIGNUP_ENABLED": "false",
|
||||
@@ -49,7 +49,7 @@ func TestOverridesAndTrimming(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if cfg.PocketBaseURL != "http://db:8090" {
|
||||
if cfg.PocketBaseURL != "http://db:8070" {
|
||||
t.Errorf("PocketBaseURL = %q", cfg.PocketBaseURL)
|
||||
}
|
||||
if len(cfg.CORSOrigins) != 2 || cfg.CORSOrigins[1] != "https://b.test" {
|
||||
|
||||
Reference in new issue
Block a user