initial commit

master
michael 2023-05-26 12:05:53 -07:00
commit 98779c5728
6 changed files with 222 additions and 0 deletions

80
.gitignore vendored Normal file
View File

@ -0,0 +1,80 @@
# Docker volume mounts
*/*-data/
# backups
*.tar
*.zip
# === WINDOWS ===
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# === MACOS ===
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# === LINUX ===
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# Homelab
## Hosts
### Cuddlefish
Services:
| Service | Internal Ports | External Ports | URL |
| :------ | :------------- | :------------- | :--- |
| Gitea | `3000` | `80` | `git.michaellisano.com` |
### Rocktiplex
| Service | Internal Ports | External Ports | URL |
| :--------------- | :------------- | :------------- | :--- |
| Fathom Analytics | `8080` | `80` | `analytics.michaellisano.com` |

8
cuddlefish/backup Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# CONTAINER_ID=b581d6283772
CONTAINER_ID=gitea
docker commit -p $CONTAINER_ID gitea-checkpoint-latest
docker save -o gitea-checkpoint-$(date | tr '[:upper:]' '[:lower:]' | tr ' ' '_').tar checkpoint-latest

View File

@ -0,0 +1,25 @@
version: "2.4"
services:
cloud:
image: nextcloud
ports:
- 80:80
environment:
NEXTCLOUD_ADMIN_USER: turtlebasket
NEXTCLOUD_ADMIN_PASSWORD: pass
POSTGRES_HOST: db
POSTGRES_DB: ncdata
POSTGRES_USER: turtlebasket
POSTGRES_PASSWORD: pass
db:
image: postgres
expose:
- 5432
environment:
POSTGRES_DB: ncdata
POSTGRES_USER: turtlebasket
POSTGRES_PASSWORD: pass

View File

@ -0,0 +1,24 @@
version: "3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:latest
container_name: gitea
environment:
USER_UID: 1000
USER_GID: 1000
restart: always
networks:
- gitea
volumes:
- ./gitea-data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"

67
cuddlefish/nginx.conf Normal file
View File

@ -0,0 +1,67 @@
#/etc/nginx/nginx.conf
events {}
http {
server {
listen 80;
server_name git.turtlebasket.ml;
client_max_body_size 50m;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name analytics.turtlebasket.ml;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name md.turtlebasket.ml;
location / {
proxy_pass http://192.168.1.25:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name money.turtlebasket.ml;
location / {
proxy_pass http://192.168.1.25:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name iot.turtlebasket.ml;
location / {
proxy_pass http://192.168.1.25:8123;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Critical for websockets, which Home Assistant uses
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}