Files
devops-it-manual/devopsGitea.tex
T

446 lines
26 KiB
TeX

\chapter{Startup Foundation with Gitea}
\ChapterLabel{Gitea}
\index{Gitea}
\section{Student Pack Domain and DNS}
This chapter records the Chapter 2 startup infrastructure completed for Group 10. The implementation was restarted on Sergio Espinal's own DigitalOcean Droplet so the group documentation reflects an environment that Sergio can administer directly rather than a teammate-owned host. The setup follows the vendor documentation for DigitalOcean Droplets and firewalls, Gitea's Docker installation model, and Caddy's automatic HTTPS reverse proxy pattern \cite{DigitalOceanDroplets,DigitalOceanFirewalls,GiteaDocker,CaddyAutomaticHTTPS,CaddyReverseProxy}.
\begin{devopsNote}[Scope]
The public startup Git service for this assignment is \href{https://git.sespinal590.dev/}{\texttt{https://git.sespinal590.dev/}}. The earlier teammate Droplet path is no longer the controlled implementation for this document because Sergio did not have administrator access to that Droplet.
\end{devopsNote}
The GitHub Student Developer Pack was used to register \texttt{sespinal590.dev} through Name.com. The Name.com order showed the domain registration discounted to \texttt{\$0.00} for the first year with Domain Safe included. The domain purchase flow showed the normal renewal price as \texttt{\$22.99/year}; this was recorded as the renewal-cost check so the startup understands the future cost after the student-pack discount ends. Because the order date was September 28, 2026 and the selected term was one year, the team treats September 28, 2027 as the first renewal deadline to track in operations. Personal address, phone, and payment information are intentionally excluded from this manual.
\begin{longtable}{L{3.5cm}L{4.4cm}L{5.0cm}}
\caption{Startup Domain Records\label{Table:GiteaDomain}}\\
\toprule
\textbf{Item} & \textbf{Value} & \textbf{Evidence or Purpose}\\
\midrule
\endfirsthead
\toprule
\textbf{Item} & \textbf{Value} & \textbf{Evidence or Purpose}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Domain & \texttt{sespinal590.dev} & Registered with the GitHub Student Developer Pack through Name.com.\\
First-year cost and renewal check & \texttt{\$0.00} first year; \texttt{\$22.99/year} renewal shown in Name.com flow & Confirms both the student-pack discount and the future renewal cost.\\
Expiration / renewal date & September 28, 2027 & One-year registration from the September 28, 2026 Name.com order.\\
Renewal tracking & Calendar reminder owned by the group one month before expiration & Future team must verify Name.com renewal status and budget before the student-pack year ends.\\
Service host & \texttt{git.sespinal590.dev} & Dedicated subdomain for the startup Git server.\\
DNS type & \texttt{A} record & Maps the Git service name to the Droplet public IPv4 address.\\
DNS target & \texttt{165.227.90.215} & Public IPv4 address assigned to the DigitalOcean Droplet.\\
DNS verification & Google DNS, Cloudflare DNS, and Windows resolver & \texttt{nslookup} and \texttt{Resolve-DnsName} returned the same public address.\\
\end{longtable}
\section{Pinned Gitea Deployment}
The startup Git service runs on a DigitalOcean Basic Droplet using Docker Compose. The Droplet selection intentionally followed the low-cost class direction: Ubuntu 24.04 LTS, regular shared CPU, 1 vCPU, 512 MB RAM, and 10 GB SSD storage at \texttt{\$4/month}.
\begin{longtable}{L{3.5cm}L{5.4cm}L{4.0cm}}
\caption{Startup Hosts and Services\label{Table:GiteaHosts}}\\
\toprule
\textbf{Resource} & \textbf{Selected Value} & \textbf{Reason}\\
\midrule
\endfirsthead
\toprule
\textbf{Resource} & \textbf{Selected Value} & \textbf{Reason}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Droplet name & \texttt{sergio-ssw590-gitea} & Human-readable name tying the host to this course and service.\\
Region & \texttt{NYC1} & Nearby DigitalOcean region for the Stevens team.\\
Image & \texttt{Ubuntu 24.04 LTS x64} & Current long-term support Linux image.\\
Plan & \texttt{s-1vcpu-512mb-10gb} & Lowest-cost plan available in the create Droplet flow.\\
Public IPv4 & \texttt{165.227.90.215} & External address used by DNS and browser testing.\\
Private IPv4 & \texttt{10.116.0.3} & Internal VPC address, not exposed directly to users.\\
SSH key & \texttt{espinKey1DigitalOceanDroplet} & Key-based access for administration.\\
\end{longtable}
The service stack uses pinned container image versions so future rebuilds are predictable.
\begin{longtable}{L{3.0cm}L{4.7cm}L{5.2cm}}
\caption{Pinned Container Versions\label{Table:GiteaContainers}}\\
\toprule
\textbf{Container} & \textbf{Image} & \textbf{Role}\\
\midrule
\endfirsthead
\toprule
\textbf{Container} & \textbf{Image} & \textbf{Role}\\
\midrule
\endhead
\bottomrule
\endlastfoot
\texttt{gitea} & \texttt{gitea/gitea:1.27.3} & Hosts the startup source-code repositories, issues, and pull requests.\\
\texttt{caddy} & \texttt{caddy:2.10.2} & Terminates HTTPS and reverse proxies requests to Gitea.\\
\end{longtable}
Docker was installed from Docker's official Ubuntu repository. The installation was verified with \texttt{docker run --rm hello-world}. The final Docker Compose deployment publishes only Caddy's web ports to the public internet; Gitea is reachable only on the private Docker network. The non-secret deployment files are versioned with this manual under \texttt{ops/gitea/} and should also be copied to the startup product repository at \href{https://git.sespinal590.dev/group10-startup/startup-product}{\texttt{group10-startup/startup-product}}. Secrets, passwords, API tokens, browser cookies, and payment details are not included in the repository.
\begin{lstlisting}[caption={Redacted Docker Compose deployment excerpt},label={Listing:GiteaCompose}]
services:
gitea:
image: gitea/gitea:1.27.3
container_name: gitea
restart: unless-stopped
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__server__ROOT_URL=https://git.sespinal590.dev/
- GITEA__server__DOMAIN=git.sespinal590.dev
- GITEA__server__HTTP_PORT=3000
- GITEA__database__DB_TYPE=sqlite3
volumes:
- /opt/gitea/data:/data
networks:
- gitea-net
caddy:
image: caddy:2.10.2
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /opt/gitea/Caddyfile:/etc/caddy/Caddyfile:ro
- /opt/gitea/caddy-data:/data
- /opt/gitea/caddy-config:/config
depends_on:
- gitea
networks:
- gitea-net
networks:
gitea-net:
\end{lstlisting}
\begin{lstlisting}[caption={Repeatable deployment commands},label={Listing:GiteaDeployCommands}]
sudo mkdir -p /opt/gitea/data /opt/gitea/caddy-data /opt/gitea/caddy-config
cd /opt/gitea
sudo docker compose pull
sudo docker compose up -d
sudo docker compose ps
\end{lstlisting}
The repeat-install procedure is: create a new Ubuntu Droplet, point \texttt{git.sespinal590.dev} to the new public IPv4 address, install Docker from the official repository, copy the versioned \texttt{compose.yml} and \texttt{Caddyfile}, restore or create \texttt{/opt/gitea/data}, run Listing~\ref{Listing:GiteaDeployCommands}, and verify HTTPS plus the Gitea organization before declaring the service ready.
\begin{lstlisting}[caption={Final service shape from Docker},label={Listing:GiteaDockerPs}]
NAMES IMAGE PORTS
caddy caddy:2.10.2 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp
gitea gitea/gitea:1.27.3 22/tcp, 3000/tcp
\end{lstlisting}
\section{Database and Persistence}
Gitea was configured with SQLite for this small course startup deployment. SQLite is acceptable here because the assignment needs a working Git service with issues, pull requests, and documentation evidence rather than a high-traffic production installation. The database file is stored in the Docker-mounted Gitea data directory:
\begin{lstlisting}[caption={Persistent Gitea storage layout},label={Listing:GiteaStorage}]
/opt/gitea/data
/opt/gitea/data/gitea/gitea.db
\end{lstlisting}
Persistence was verified by creating real startup artifacts, replacing the Gitea container, and confirming that the artifacts still existed after the service returned.
\begin{longtable}{L{3.4cm}L{9.8cm}}
\caption{Persistence Verification\label{Table:GiteaPersistence}}\\
\toprule
\textbf{Check} & \textbf{Observed Result}\\
\midrule
\endfirsthead
\toprule
\textbf{Check} & \textbf{Observed Result}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Before replacement & Repository \texttt{group10-startup/startup-product} existed with five issues.\\
Replacement action & \texttt{docker compose rm -sf gitea} followed by \texttt{docker compose up -d}.\\
After replacement & The same repository and issue records were still present in SQLite.\\
Conclusion & Gitea application state is stored outside the disposable container layer.\\
\end{longtable}
SQLite does not require a separate database username or password in this deployment. The secret-handling control is therefore focused on the Gitea administrator password, the test reviewer password, DigitalOcean/Name.com credentials, and temporary setup tokens; those items are handled in Table~\ref{Table:GiteaPasswordHints} rather than written into the manual or repository.
\section{HTTPS and Certificate Renewal}
Caddy was added as the internet-facing reverse proxy so users visit Gitea with HTTPS instead of the temporary setup URL on port 3000. The team compared two certificate-management options before keeping Caddy in the deployment:
\begin{longtable}{L{4.0cm}L{4.6cm}L{4.6cm}}
\caption{Certificate Option Comparison\label{Table:GiteaCertificateOptions}}\\
\toprule
\textbf{Option} & \textbf{Strength} & \textbf{Reason Noted}\\
\midrule
\endfirsthead
\toprule
\textbf{Option} & \textbf{Strength} & \textbf{Reason Noted}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Caddy automatic HTTPS & Built-in ACME certificate request, HTTP-to-HTTPS redirect, TLS termination, and renewal state in a persistent volume. & Selected because it keeps the course deployment small and avoids separate certificate-renewal scripts.\\
Certbot plus Nginx or manual reverse proxy & Common Linux pattern with explicit \texttt{certbot renew --dry-run}. & Not selected because it adds another tool and more manual configuration for the same small Gitea service.\\
\end{longtable}
The Caddy configuration is intentionally small:
\begin{lstlisting}[caption={Caddy reverse proxy configuration},label={Listing:Caddyfile}]
git.sespinal590.dev {
encode zstd gzip
reverse_proxy gitea:3000
}
\end{lstlisting}
Gitea was then configured with the final root URL \texttt{https://git.sespinal590.dev/}. Caddy terminates TLS at the public edge and forwards plain HTTP only inside the private Docker network to \texttt{gitea:3000}. Caddy obtained a Let's Encrypt certificate automatically. The verified certificate subject was \texttt{CN = git.sespinal590.dev}, issued by Let's Encrypt \texttt{YE1}, valid from September 28, 2026 to December 27, 2026.
\begin{longtable}{L{4.0cm}L{9.2cm}}
\caption{HTTPS Verification\label{Table:GiteaHttps}}\\
\toprule
\textbf{Test} & \textbf{Result}\\
\midrule
\endfirsthead
\toprule
\textbf{Test} & \textbf{Result}\\
\midrule
\endhead
\bottomrule
\endlastfoot
HTTP request & \texttt{http://git.sespinal590.dev/} returned \texttt{308 Permanent Redirect}.\\
HTTPS request & \texttt{https://git.sespinal590.dev/} returned \texttt{HTTP/2 200}.\\
Browser check & The Gitea home page loaded with title \texttt{SSW 590 Startup Gitea}.\\
Certificate automation & Caddy logs showed successful ACME challenge completion and certificate storage.\\
Renewal verification & Caddy does not use Certbot's separate \texttt{renew --dry-run} command. The supported renewal check for this deployment was to validate the Caddy configuration, confirm the certificate is managed by Caddy automatic HTTPS, and confirm Caddy's certificate storage is mounted at \texttt{/opt/gitea/caddy-data}. A real renewal event cannot be observed until the certificate approaches expiration.\\
\end{longtable}
\section{Firewall and External Exposure}
A DigitalOcean Cloud Firewall was attached to the Droplet \texttt{sergio-ssw590-gitea}. The firewall keeps administrative access narrow while allowing normal web users to reach the startup Git service. The firewall record should be kept with a course-specific name such as \texttt{ssw590-gitea-web-ssh} in DigitalOcean so a future administrator can identify it quickly.
\begin{longtable}{L{2.0cm}L{2.0cm}L{2.2cm}L{6.8cm}}
\caption{Inbound Firewall Rules\label{Table:GiteaFirewall}}\\
\toprule
\textbf{Type} & \textbf{Protocol} & \textbf{Port} & \textbf{Source}\\
\midrule
\endfirsthead
\toprule
\textbf{Type} & \textbf{Protocol} & \textbf{Port} & \textbf{Source}\\
\midrule
\endhead
\bottomrule
\endlastfoot
SSH & TCP & 22 & Sergio's current public IP only: \texttt{108.35.145.74/32}.\\
HTTP & TCP & 80 & All IPv4 and All IPv6, needed for redirects and certificate validation.\\
HTTPS & TCP & 443 & All IPv4 and All IPv6, needed for normal browser access.\\
\end{longtable}
External exposure was tested from Sergio's workstation after the firewall was created on September 29, 2026. Ports 80 and 443 were reachable. Port 3000 was not reachable externally, which is the desired result because Gitea should sit behind Caddy. HTTPS protects browser traffic with encryption and certificate validation; the firewall solves a different problem by deciding which network services can be reached at all. Therefore HTTPS alone would not protect an accidentally exposed backend, database, or SSH service.
\begin{longtable}{L{3.6cm}L{3.0cm}L{2.0cm}L{4.2cm}}
\caption{External Port Verification\label{Table:GiteaPorts}}\\
\toprule
\textbf{Target} & \textbf{Expected} & \textbf{Result} & \textbf{Meaning}\\
\midrule
\endfirsthead
\toprule
\textbf{Target} & \textbf{Expected} & \textbf{Result} & \textbf{Meaning}\\
\midrule
\endhead
\bottomrule
\endlastfoot
\texttt{:80} on service host & Open redirect & Pass & HTTP redirects to HTTPS.\\
\texttt{:443} on service host & Open web UI & Pass & HTTPS Gitea service is available.\\
\texttt{:22} on Droplet IP & Open only to Sergio's IP & Pass from allowed IP & Administrative SSH is limited by source.\\
\texttt{:3000} on service host & Blocked & Blocked & Direct Gitea port is not exposed publicly.\\
\texttt{:5432} on service host & Blocked & Blocked & No database port is exposed publicly.\\
\end{longtable}
\section{Startup Team Workflow}
The Gitea instance was not left as an empty installation. A startup organization, repository, issues, branches, pull requests, review account, and merges were created to show the group can use the service as a small startup source-control platform.
\begin{longtable}{L{4.0cm}L{9.2cm}}
\caption{Startup Workspace Records\label{Table:GiteaWorkflow}}\\
\toprule
\textbf{Artifact} & \textbf{Evidence}\\
\midrule
\endfirsthead
\toprule
\textbf{Artifact} & \textbf{Evidence}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Organization & \href{https://git.sespinal590.dev/group10-startup}{\texttt{group10-startup}}.\\
Repository & \href{https://git.sespinal590.dev/group10-startup/startup-product}{\texttt{group10-startup/startup-product}}.\\
README & \href{https://git.sespinal590.dev/group10-startup/startup-product/src/branch/main/README.md}{\texttt{startup-product/README.md}}.\\
Administrator & Sergio's \texttt{sespinal} account.\\
Team member roles & Sergio Espinal: infrastructure owner and Gitea administrator. Turan Islamli: teammate contributor/reviewer to be added to the organization for continued group work.\\
Review account & A separate non-admin reviewer account was created for pull-request testing.\\
Open issues & Runbook, persistent-storage verification, and HTTPS/firewall evidence issues remained open for continued operations.\\
\end{longtable}
\begin{devopsNote}[Member Access]
The pull-request review workflow was tested with a separate non-admin account because Sergio controlled the Droplet and could create the test account immediately. For real group use, Turan Islamli should be invited to the Gitea organization with the appropriate repository role so future reviews use named team accounts rather than a temporary test reviewer.
\end{devopsNote}
The startup backlog was created as Gitea issues so planned work is visible and reviewable.
\begin{longtable}{L{1.5cm}L{5.3cm}L{2.0cm}L{4.0cm}}
\caption{Startup Backlog Evidence\label{Table:GiteaBacklog}}\\
\toprule
\textbf{Issue} & \textbf{Title} & \textbf{Status} & \textbf{Evidence}\\
\midrule
\endfirsthead
\toprule
\textbf{Issue} & \textbf{Title} & \textbf{Status} & \textbf{Evidence}\\
\midrule
\endhead
\bottomrule
\endlastfoot
\texttt{\#1} & Draft startup product vision & Closed & Closed by reviewed and merged pull request \texttt{\#6}.\\
\texttt{\#2} & Add initial feature backlog & Closed & Closed by reviewed and merged pull request \texttt{\#7}.\\
\texttt{\#3} & Document Gitea operating runbook & Open & Retained as follow-up operations work.\\
\texttt{\#4} & Verify persistent storage after container replacement & Open & Used to track persistence evidence and future repeat checks.\\
\texttt{\#5} & Prepare HTTPS and firewall evidence & Open & Used to track security and exposure evidence.\\
\end{longtable}
Two issue-driven pull requests were completed:
\begin{enumerate}[leftmargin=*]
\item Issue \texttt{\#1}, ``Draft startup product vision,'' was closed by pull request \texttt{\#6}, ``Document product vision.'' The feature branch commit was \texttt{904d468}. The reviewer account reviewed the pull request before it was merged.
\item Issue \texttt{\#2}, ``Add initial feature backlog,'' was closed by pull request \texttt{\#7}. The branch was updated after a merge conflict and merged after review. The final branch-update commit was \texttt{95573e8}.
\end{enumerate}
This verifies that the startup can use Gitea for the basic DevOps collaboration loop: create an issue, create a branch, make a change, open a pull request, review it with another account, merge it, and close the issue.
\section{Architecture and Operation}
Figure~\ref{Figure:GiteaArchitecture} summarizes the deployed architecture.
\begin{figure}[htbp]
\centering
\fbox{\begin{minipage}{0.88\linewidth}
\centering
\textbf{User Browser}\\
\texttt{https://git.sespinal590.dev}\\[4pt]
$\Downarrow$\\[4pt]
\textbf{Name.com DNS}\\
\texttt{git.sespinal590.dev -> 165.227.90.215}\\[4pt]
$\Downarrow$\\[4pt]
\textbf{DigitalOcean Cloud Firewall}\\
Allow 80/443 publicly; allow 22 only from Sergio's current IP\\[4pt]
$\Downarrow$\\[4pt]
\textbf{Caddy Container}\\
Automatic HTTPS and reverse proxy\\[4pt]
$\Downarrow$\\[4pt]
\textbf{Gitea Container}\\
Repository, issues, pull requests, and users\\[4pt]
$\Downarrow$\\[4pt]
\textbf{Persistent Volume}\\
\texttt{/opt/gitea/data/gitea/gitea.db}
\end{minipage}}
\caption{Startup Gitea deployment architecture}
\label{Figure:GiteaArchitecture}
\end{figure}
\begin{longtable}{L{4.2cm}L{9.0cm}}
\caption{Operational Controls\label{Table:GiteaControls}}\\
\toprule
\textbf{Control} & \textbf{Implementation}\\
\midrule
\endfirsthead
\toprule
\textbf{Control} & \textbf{Implementation}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Least privilege network access & Only ports 80 and 443 are public. SSH is restricted to a single public IP source.\\
No direct application port & Port 3000 is internal to Docker after Caddy was installed.\\
Pinned runtime versions & Gitea and Caddy container image tags are fixed instead of floating latest tags.\\
Persistent data & Gitea state is stored on the host-mounted data directory, not only inside the container filesystem.\\
Temporary credential cleanup & Temporary \texttt{codex-*} API tokens were deleted after setup.\\
Sensitive information handling & Passwords, payment details, personal address, and phone information are not stored in this manual.\\
\end{longtable}
\begin{longtable}{L{4.0cm}L{9.2cm}}
\caption{Restart and Troubleshooting Runbook\label{Table:GiteaRunbook}}\\
\toprule
\textbf{Task} & \textbf{Command or Procedure}\\
\midrule
\endfirsthead
\toprule
\textbf{Task} & \textbf{Command or Procedure}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Check service status & Run \texttt{cd /opt/gitea \&\& sudo docker compose ps}. Expected result: \texttt{caddy} and \texttt{gitea} are running.\\
Restart the stack & Run \texttt{cd /opt/gitea \&\& sudo docker compose restart}. Use this after configuration changes or if one container is unhealthy.\\
Read logs & Run \texttt{sudo docker logs --tail 100 caddy} for HTTPS/proxy issues and \texttt{sudo docker logs --tail 100 gitea} for application issues.\\
Validate Caddy configuration & Run \texttt{sudo docker exec caddy caddy validate --config /etc/caddy/Caddyfile}.\\
Recreate containers safely & Run \texttt{cd /opt/gitea \&\& sudo docker compose up -d}. Persistent state remains in \texttt{/opt/gitea/data}.\\
DNS check & Run \texttt{nslookup git.sespinal590.dev 8.8.8.8} and confirm \texttt{165.227.90.215}.\\
Exposure check & Re-run Table~\ref{Table:GiteaPorts} after firewall or proxy changes.\\
\end{longtable}
The persistence test in Table~\ref{Table:GiteaPersistence} and the backup/restore test in Section~\ref{Section:GiteaExtraCredit} measure different risks. Persistence proves normal container replacement does not delete Gitea state because the data lives in a host-mounted directory. Backup and restore proves a separate copy can recover the service if the working data directory or Droplet is damaged.
\section{Manual Quality and Controls}
\begin{longtable}{L{4.1cm}L{9.1cm}}
\caption{Password Hint and Secret Handling Controls\label{Table:GiteaPasswordHints}}\\
\toprule
\textbf{Item} & \textbf{Manual Rule}\\
\midrule
\endfirsthead
\toprule
\textbf{Item} & \textbf{Manual Rule}\\
\midrule
\endhead
\bottomrule
\endlastfoot
DigitalOcean account & Payment details are entered manually by the account owner and are not recorded.\\
Name.com account & Contact, address, phone, and payment details are excluded from screenshots or text.\\
Gitea administrator password & Password is known only to the account owner and is not placed in Git, Overleaf, screenshots, or prompts.\\
Review account password & Used only for testing the review flow and should be rotated or replaced before real group use.\\
API tokens & Temporary setup tokens are deleted when no longer needed.\\
\end{longtable}
The main documentation risk is that screenshots may accidentally include personal information. Any screenshot from the Name.com order page must be cropped or redacted before inclusion because the original confirmation page displayed contact details. Any screenshot from Gitea should avoid showing passwords, session tokens, or private browser profile details.
\subsection*{Rubric Evidence Summary}
Table~\ref{Table:GiteaRubricEvidence} maps the Chapter 2 rubric to the evidence in this manual. It is intentionally unnumbered so the eight required Chapter 2 sections stay in the instructor's order.
\begin{longtable}{L{4.8cm}L{2.0cm}L{6.4cm}}
\caption{Rubric Evidence Checklist\label{Table:GiteaRubricEvidence}}\\
\toprule
\textbf{Rubric Criterion} & \textbf{Status} & \textbf{Evidence in This Chapter}\\
\midrule
\endfirsthead
\toprule
\textbf{Rubric Criterion} & \textbf{Status} & \textbf{Evidence in This Chapter}\\
\midrule
\endhead
\bottomrule
\endlastfoot
Student Pack domain, cost/renewal check, DNS evidence & Complete & Table~\ref{Table:GiteaDomain} records the domain, first-year cost, renewal cost, expiration/renewal date, DNS target, and resolver checks.\\
Pinned Gitea deployment and reproducible configuration & Complete & Tables~\ref{Table:GiteaHosts} and~\ref{Table:GiteaContainers} plus Listings~\ref{Listing:GiteaCompose},~\ref{Listing:GiteaDeployCommands}, and~\ref{Listing:GiteaDockerPs} record the host, image versions, restart policy, mounts, proxy relationship, and repeat-install commands.\\
Database configuration and persistence verification & Complete & Listing~\ref{Listing:GiteaStorage}, Table~\ref{Table:GiteaPersistence}, and Table~\ref{Table:GiteaPasswordHints} record SQLite storage, persistence after container replacement, and secret-handling boundaries.\\
Valid HTTPS, redirect, certificate details, renewal test & Complete & Tables~\ref{Table:GiteaCertificateOptions} and~\ref{Table:GiteaHttps} record the certificate-option comparison, HTTP redirect, HTTPS success, certificate details, TLS termination point, and Caddy's supported renewal verification path.\\
Firewall, limited exposure, external verification & Complete & Tables~\ref{Table:GiteaFirewall} and~\ref{Table:GiteaPorts} record allowed ports, blocked direct service/database ports, expected results, observed results, and the difference between HTTPS and firewall controls.\\
Startup organization, backlog, issue-to-review-merge workflow & Complete & Tables~\ref{Table:GiteaWorkflow} and~\ref{Table:GiteaBacklog} plus the pull-request notes record organization, repository, README link, member-role plan, backlog, reviews, and merges.\\
Architecture and operational explanation & Complete & Figure~\ref{Figure:GiteaArchitecture} and Tables~\ref{Table:GiteaControls} and~\ref{Table:GiteaRunbook} explain the architecture, controls, restart procedure, troubleshooting procedure, and persistence-versus-backup distinction.\\
Versioned IT manual, history, Hosts/Passwords hints, citations and evidence & Complete & Document History records version 1.6; Tables~\ref{Table:GiteaHosts} and~\ref{Table:GiteaPasswordHints} record hosts and password-handling hints; citations appear in the chapter introduction and bibliography.\\
\end{longtable}
\section{Optional Extra Credit: Backup and Restore}
\label{Section:GiteaExtraCredit}
An additional backup and restore test was performed to demonstrate recoverability. The backup procedure produced an application data archive, a SQLite database backup, and a checksum file:
\begin{lstlisting}[caption={Backup files retained on the Droplet},label={Listing:GiteaBackups}]
/opt/gitea-backup-test/backups/gitea-data-20260929T063202Z.tar.gz
/opt/gitea-backup-test/backups/gitea-db-20260929T063202Z.sqlite
/opt/gitea-backup-test/backups/gitea-backup-20260929T063202Z.sha256
\end{lstlisting}
The restore test was intentionally isolated from production. A separate restore directory and container were used on \texttt{127.0.0.1:3001}. The restored service returned \texttt{HTTP/1.1 200 OK} for the startup repository page. A database query against the restored copy showed the expected repository and issue records, including the merged pull requests and remaining open operations issues.
\begin{devopsNote}[Extra Credit Result]
The restore container was shut down after verification. The backup files remain on the Droplet for evidence, while the production Gitea and Caddy containers continue to serve \texttt{https://git.sespinal590.dev/}.
\end{devopsNote}