My personal portfolio.
- C 93.1%
- HTML 6.4%
- Dockerfile 0.3%
- Makefile 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| fragments | ||
| include/md4c | ||
| posts | ||
| public | ||
| src | ||
| static | ||
| .clang-format | ||
| .containerignore | ||
| .gitignore | ||
| Containerfile | ||
| Makefile | ||
| portfolio.container | ||
| README.md | ||
Portfolio
My personal website and Forgejo instance.
$ make
$ ./bin server
Installation
Podman
Build and run the container like so:
$ podman build -t portfolio .
$ podman run -p 8000:8000 portfolio
The portfolio.container file is a Quadlet. After building the container image, you
can install the systemd unit onto the host:
$ podman build -t portfolio .
$ podman quadlet install portfolio.container
Forgejo
Forgejo should be running as a systemd service on port 3000 once finished. Follow
installation instructions here
to get started.
NGINX
We use Let's Encrypt to get TLS certificates. Run the following on the host:
$ certbot certonly --standalone -d jrpotter.com -d www.jrpotter.com -d git.jrpotter.com
You can then expose the container by including the following stanzas within an NGINX config:
server {
server_name jrpotter.com www.jrpotter.com;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/jrpotter.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/jrpotter.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
server_name git.jrpotter.com;
merge_slashes off;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/jrpotter.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/jrpotter.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 512M;
}
}