update
This commit is contained in:
@@ -7,6 +7,7 @@ HTTPS_PORT=8643
|
|||||||
# Used only with compose.direct.yaml or ./manage.sh start-direct.
|
# Used only with compose.direct.yaml or ./manage.sh start-direct.
|
||||||
BROKER_DIRECT_PORT=8080
|
BROKER_DIRECT_PORT=8080
|
||||||
GITEA_DIRECT_PORT=3000
|
GITEA_DIRECT_PORT=3000
|
||||||
|
GITEA_DIRECT_ROOT_URL=http://localhost:3000/
|
||||||
|
|
||||||
# letsencrypt: manage a certificate automatically with Certbot.
|
# letsencrypt: manage a certificate automatically with Certbot.
|
||||||
# custom: read the named certificate files from ./config/ssl.
|
# custom: read the named certificate files from ./config/ssl.
|
||||||
|
|||||||
@@ -7,3 +7,6 @@ services:
|
|||||||
gitea:
|
gitea:
|
||||||
ports:
|
ports:
|
||||||
- "${GITEA_DIRECT_PORT:-3000}:3000"
|
- "${GITEA_DIRECT_PORT:-3000}:3000"
|
||||||
|
environment:
|
||||||
|
GITEA__server__ROOT_URL: ${GITEA_DIRECT_ROOT_URL:-http://localhost:3000/}
|
||||||
|
GITEA__session__COOKIE_SECURE: "false"
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ services:
|
|||||||
GITEA__server__HTTP_ADDR: 0.0.0.0
|
GITEA__server__HTTP_ADDR: 0.0.0.0
|
||||||
GITEA__server__HTTP_PORT: "3000"
|
GITEA__server__HTTP_PORT: "3000"
|
||||||
GITEA__server__DISABLE_SSH: "true"
|
GITEA__server__DISABLE_SSH: "true"
|
||||||
|
GITEA__session__COOKIE_SECURE: "true"
|
||||||
GITEA__service__DISABLE_REGISTRATION: "true"
|
GITEA__service__DISABLE_REGISTRATION: "true"
|
||||||
GITEA__security__INSTALL_LOCK: "true"
|
GITEA__security__INSTALL_LOCK: "true"
|
||||||
security_opt:
|
security_opt:
|
||||||
|
|||||||
+20
-7
@@ -127,15 +127,27 @@ Gitea uses its own SQLite database at
|
|||||||
`config/gitea/data/data/gitea.db`.
|
`config/gitea/data/data/gitea.db`.
|
||||||
|
|
||||||
For local testing that bypasses Nginx, set `BROKER_DIRECT_PORT` and
|
For local testing that bypasses Nginx, set `BROKER_DIRECT_PORT` and
|
||||||
`GITEA_DIRECT_PORT` in `.env`, then run:
|
`GITEA_DIRECT_PORT` in `.env`. Set `GITEA_DIRECT_ROOT_URL` to the exact URL the
|
||||||
|
test browser will use, including the VM hostname or IP address and port:
|
||||||
|
|
||||||
|
```dotenv
|
||||||
|
BROKER_DIRECT_PORT=8080
|
||||||
|
GITEA_DIRECT_PORT=3000
|
||||||
|
GITEA_DIRECT_ROOT_URL=http://192.0.2.10:3000/
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./manage.sh start-direct
|
./manage.sh start-direct
|
||||||
```
|
```
|
||||||
|
|
||||||
This adds host mappings to the broker's port 8080 and Gitea's port 3000. Do not
|
This adds host mappings to the broker's port 8080 and Gitea's port 3000. It
|
||||||
use the direct-port override on an Internet-facing production VM. Return to the
|
also changes Gitea's root URL and session cookie policy to permit HTTP login.
|
||||||
production port layout with:
|
The direct broker port is suitable for health and API testing; technician
|
||||||
|
OAuth login remains designed for the HTTPS public URL. Do not use the
|
||||||
|
direct-port override on an Internet-facing production VM. Return to the
|
||||||
|
production URL and secure-cookie policy with:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./manage.sh start
|
./manage.sh start
|
||||||
@@ -184,9 +196,10 @@ cd /YOUR/INSTALL/PARENT/TA-Deployment-Access
|
|||||||
```
|
```
|
||||||
|
|
||||||
The updater operates only on the current VM. It fast-forwards the checked-out
|
The updater operates only on the current VM. It fast-forwards the checked-out
|
||||||
branch, pulls the pinned Gitea image, rebuilds and restarts the local stack, and
|
branch, pulls the pinned Gitea and Nginx images, rebuilds and restarts the local
|
||||||
waits for the local broker to become healthy. It has no peer discovery, SSH, or
|
stack, and waits for the local broker to become healthy. Certbot is not pulled
|
||||||
multi-node update behavior.
|
or run during a routine update; it is used only by `bootstrap` and `renew`. The
|
||||||
|
updater has no peer discovery, SSH, or multi-node update behavior.
|
||||||
|
|
||||||
Pin image versions as supplied and review release notes before changing them.
|
Pin image versions as supplied and review release notes before changing them.
|
||||||
Never change Gitea between rootless and rootful image families in place.
|
Never change Gitea between rootless and rootful image families in place.
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ if ((post_pull == 0)); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf 'Updating the local Gitea image and deployment stack...\n'
|
printf 'Updating the local Gitea image and deployment stack...\n'
|
||||||
docker compose --env-file .env pull gitea nginx certbot
|
docker compose --env-file .env pull gitea nginx
|
||||||
"${DEPLOY_ROOT}/manage.sh" start
|
"${DEPLOY_ROOT}/manage.sh" start
|
||||||
|
|
||||||
container_id="$(docker compose -f compose.yaml -f compose.tls.yaml ps -q broker)"
|
container_id="$(docker compose -f compose.yaml -f compose.tls.yaml ps -q broker)"
|
||||||
|
|||||||
Reference in New Issue
Block a user