docker update

This commit is contained in:
David Schroeder
2026-07-26 14:29:23 -05:00
parent 4511d3a0a3
commit 8d17c83f35
5 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ GITEA_DOMAIN=git.example.com
LETSENCRYPT_EMAIL=admin@example.com LETSENCRYPT_EMAIL=admin@example.com
HTTP_PORT=8680 HTTP_PORT=8680
HTTPS_PORT=8643 HTTPS_PORT=8643
GITEA_SSH_PORT=2222 GITEA_HTTP_PORT=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.
+1 -1
View File
@@ -14,7 +14,7 @@ The production layout is a self-contained, single-VM Docker deployment:
- explicit runtime storage under `config/` beside the Compose files - explicit runtime storage under `config/` beside the Compose files
No external database or load balancer is required. The datacenter edge only No external database or load balancer is required. The datacenter edge only
needs to forward TCP 80, 443, and 2222 to the Docker VM. needs to forward public TCP 80 and 443 to the configured Docker VM ports.
See [docs/deployment.md](docs/deployment.md) for the installation, Gitea setup, See [docs/deployment.md](docs/deployment.md) for the installation, Gitea setup,
TLS bootstrap, repository move, renewal, backup, and update procedures. The TLS bootstrap, repository move, renewal, backup, and update procedures. The
+2
View File
@@ -2,6 +2,7 @@ name: tapm
services: services:
broker: broker:
container_name: tapm-broker
build: . build: .
image: tai/tapm-deployment-broker:local image: tai/tapm-deployment-broker:local
env_file: env_file:
@@ -55,4 +56,5 @@ services:
networks: networks:
edge: edge:
external: true
name: tapm-edge name: tapm-edge
+3 -5
View File
@@ -2,6 +2,7 @@ name: tapm-gitea
services: services:
gitea: gitea:
container_name: tapm-gitea
image: docker.gitea.com/gitea:1.26.4-rootless image: docker.gitea.com/gitea:1.26.4-rootless
restart: unless-stopped restart: unless-stopped
env_file: env_file:
@@ -10,7 +11,7 @@ services:
networks: networks:
- edge - edge
ports: ports:
- "${GITEA_SSH_PORT:-2222}:2222" - "${GITEA_HTTP_PORT:-3000}:3000"
volumes: volumes:
- ../../config/gitea/data:/var/lib/gitea - ../../config/gitea/data:/var/lib/gitea
- ../../config/gitea/config:/etc/gitea - ../../config/gitea/config:/etc/gitea
@@ -19,10 +20,7 @@ services:
GITEA__database__PATH: /var/lib/gitea/data/gitea.db GITEA__database__PATH: /var/lib/gitea/data/gitea.db
GITEA__server__DOMAIN: ${GITEA_DOMAIN} GITEA__server__DOMAIN: ${GITEA_DOMAIN}
GITEA__server__ROOT_URL: https://${GITEA_DOMAIN}/ GITEA__server__ROOT_URL: https://${GITEA_DOMAIN}/
GITEA__server__SSH_DOMAIN: ${GITEA_DOMAIN} GITEA__server__DISABLE_SSH: "true"
GITEA__server__SSH_PORT: ${GITEA_SSH_PORT:-2222}
GITEA__server__START_SSH_SERVER: "true"
GITEA__server__SSH_LISTEN_PORT: "2222"
GITEA__service__DISABLE_REGISTRATION: "true" GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__security__INSTALL_LOCK: "true" GITEA__security__INSTALL_LOCK: "true"
security_opt: security_opt:
+12 -11
View File
@@ -11,17 +11,17 @@ It consists of four containers:
- Nginx, terminating TLS for the broker and Gitea - Nginx, terminating TLS for the broker and Gitea
- Certbot, run on demand for certificate issuance and renewal - Certbot, run on demand for certificate issuance and renewal
Only the configured Nginx HTTP/HTTPS ports and Gitea SSH port are published. The configured Nginx HTTP/HTTPS ports and Gitea HTTP port are published. They
They default to 8680, 8643, and 2222. Inside Docker, Nginx continues to listen default to 8680, 8643, and 3000. Inside Docker, Nginx continues to listen on
on ports 80 and 443. The broker and Gitea HTTP services are reachable only on ports 80 and 443 and Gitea listens on port 3000. Gitea SSH is disabled.
the private `tapm-edge` Docker network.
## 1. VM and network ## 1. VM and network
Install Docker Engine with Compose v2. Permit the selected HTTP, HTTPS, and SSH Install Docker Engine with Compose v2. Permit the selected HTTP and HTTPS ports
ports and forward public TCP 80, 443, and the selected SSH port from the and forward public TCP 80 and 443 from the datacenter edge to them. The
datacenter edge to them. Create public DNS A/AAAA records for both application `GITEA_HTTP_PORT` binding is intended for direct local or management access and
names before requesting the certificate. should be firewalled from untrusted networks. Create public DNS A/AAAA records
for both application names before requesting the certificate.
Public port 80 must reach the container's port 80 for HTTP-01 certificate Public port 80 must reach the container's port 80 for HTTP-01 certificate
renewal. For example, if `HTTP_PORT=8080`, the edge must forward public port 80 renewal. For example, if `HTTP_PORT=8080`, the edge must forward public port 80
@@ -41,8 +41,9 @@ chmod 600 .env
Set `BROKER_DOMAIN`, `GITEA_DOMAIN`, and `LETSENCRYPT_EMAIL` first. `HTTP_PORT` Set `BROKER_DOMAIN`, `GITEA_DOMAIN`, and `LETSENCRYPT_EMAIL` first. `HTTP_PORT`
and `HTTPS_PORT` control the VM-side Docker bindings and default to 8680 and and `HTTPS_PORT` control the VM-side Docker bindings and default to 8680 and
8643. The datacenter edge should therefore forward public ports 80 and 443 to 8643. The datacenter edge should therefore forward public ports 80 and 443 to
VM ports 8680 and 8643. Replace all example domains in the TAPM variables. VM ports 8680 and 8643. `GITEA_HTTP_PORT` controls the host binding for Gitea's
Generate the cookie secret with: port 3000 and defaults to 3000. Replace all example domains in the TAPM
variables. Generate the cookie secret with:
```sh ```sh
openssl rand -base64 48 openssl rand -base64 48
@@ -129,7 +130,7 @@ Gitea and mirror all refs:
```sh ```sh
git clone --mirror OLD-REPOSITORY-URL git clone --mirror OLD-REPOSITORY-URL
cd REPOSITORY.git cd REPOSITORY.git
git push --mirror ssh://git@GITEA_DOMAIN:2222/TAI/REPOSITORY.git git push --mirror https://GITEA_DOMAIN/TAI/REPOSITORY.git
``` ```
Update developer remotes, CI credentials, submodules, documentation, and the Go Update developer remotes, CI credentials, submodules, documentation, and the Go