Initial Hello World site
This commit is contained in:
72
README.md
Normal file
72
README.md
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# www.kenjim.com
|
||||||
|
|
||||||
|
Static website served via nginx Docker container on zet.home.arpa, proxied through nginx SSL termination at `https://www.kenjim.com`.
|
||||||
|
|
||||||
|
## Development Workflow
|
||||||
|
|
||||||
|
Edit on Mac → push to Gitea → pull on zet → site updates live.
|
||||||
|
|
||||||
|
```
|
||||||
|
Mac Gitea (git.kenjim.com) zet.home.arpa
|
||||||
|
│ git push │ │
|
||||||
|
├─────────────────────────────────►│ │
|
||||||
|
│ │ git pull │
|
||||||
|
│ ├───────────────────────────►│
|
||||||
|
│ │ │ docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
www.kenjim.com/
|
||||||
|
├── docker-compose.yml # runs nginx:alpine on host port 8080
|
||||||
|
└── html/ # web root — edit files here
|
||||||
|
└── index.html
|
||||||
|
```
|
||||||
|
|
||||||
|
All files under `html/` are served directly. No build step required for static content.
|
||||||
|
|
||||||
|
## Running on zet
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~/workspace/src/personal/www.kenjim.com
|
||||||
|
|
||||||
|
docker compose up -d # start
|
||||||
|
docker compose down # stop
|
||||||
|
docker compose logs -f # watch logs
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deploying Changes
|
||||||
|
|
||||||
|
On zet after pushing from Mac:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~/workspace/src/personal/www.kenjim.com
|
||||||
|
git pull
|
||||||
|
# nginx:alpine picks up file changes immediately via volume mount — no restart needed
|
||||||
|
```
|
||||||
|
|
||||||
|
If `docker-compose.yml` itself changes, recreate the container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## How It Connects to nginx
|
||||||
|
|
||||||
|
The container listens on host port `8080`. The nginx reverse proxy on zet routes `https://www.kenjim.com` → `http://127.0.0.1:8080`.
|
||||||
|
|
||||||
|
See `~/workspace/src/personal/appa-net/zet.home.arpa/nginx/kenjim.conf` for the nginx config.
|
||||||
|
|
||||||
|
## Mac Setup (first time)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the repo on your Mac
|
||||||
|
git clone http://kenjim@git.kenjim.com/kenjim/www.kenjim.com.git
|
||||||
|
cd www.kenjim.com
|
||||||
|
|
||||||
|
# Edit html/ files, then:
|
||||||
|
git add .
|
||||||
|
git commit -m "your message"
|
||||||
|
git push
|
||||||
|
```
|
||||||
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
www:
|
||||||
|
image: nginx:alpine
|
||||||
|
container_name: www-kenjim
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
volumes:
|
||||||
|
- ./html:/usr/share/nginx/html:ro
|
||||||
|
restart: always
|
||||||
35
html/index.html
Normal file
35
html/index.html
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>www.kenjim.com</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||||
|
background: #0f172a;
|
||||||
|
color: #f1f5f9;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
text-align: center;
|
||||||
|
padding: 3rem 4rem;
|
||||||
|
border: 1px solid #1e293b;
|
||||||
|
border-radius: 1rem;
|
||||||
|
background: #1e293b;
|
||||||
|
}
|
||||||
|
h1 { margin: 0 0 0.5rem; font-size: 2.5rem; }
|
||||||
|
p { margin: 0; color: #94a3b8; font-size: 1.1rem; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="card">
|
||||||
|
<h1>Hello World</h1>
|
||||||
|
<p>www.kenjim.com</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user