Go to file
2024-08-08 11:25:28 -07:00
backend minor title fix profile 2024-08-08 11:25:28 -07:00
db/init db user restrict access to container 2024-08-06 09:01:04 -07:00
other fix db backup script 2024-08-07 13:51:46 +00:00
proxy db root localhost only 2024-08-06 16:27:32 +00:00
tor alpine for tor 2024-08-08 04:42:12 -07:00
.gitignore working tor 2024-08-08 02:17:49 -07:00
compose.yaml add registration switch env 2024-08-08 16:10:43 +00:00
compose.yaml.local add registration switch env composes 2024-08-08 16:14:28 +00:00
compose.yaml.prod add registration switch env composes 2024-08-08 16:14:28 +00:00
dotenv restorve dev values for env example checked safe 2024-08-08 10:14:31 -07:00
LICENSE initial re-commit to wipe commit histoy due to public repo 2024-07-06 21:10:44 +00:00
nfmREADME.md initial re-commit to wipe commit histoy due to public repo 2024-07-06 21:10:44 +00:00
README.md prod cleanup for live c10 2024-08-05 09:55:47 +00:00

Site Setup

Sec:

  • This repo is public. Mind cred slip-ups.
  • Please note changes to /etc/sshd/sshd_conf made by lll script. If different method is used, audit manually.
  • Note app Dockerfile debug console, found at /console. Werkzeug/flask is WILDLY insecure if left in dev/dbg.
  • Avoid docker socks stuff.

Install:

apt install unattended-upgrades docker.io docker-compose ufw ssh
apt install vim git tmux htop

Install? PROBABLY NOT, this runs entirely in alpine and would be nice to isolate:

apt install python3-flask python3-full pip
pip install mysql-connector-python

Admin general:

usermod -aG docker finn

Admin firewall:

ufw default deny incoming
ufw default allow outgoing
ufw allow "OpenSSH"
ufw allow "WWW Full"
ufw enable

Admin dns:

set up domainUpdate script
set up cron job for script

Filesystem:

docker dir (d)
  certbot dns
  tmp for awesome compose or compose sandboxing
  site (main dc) TRACKED HERE
    db - holds init script
    proxy - important conf
    backend - app
    gitea - managed primarily by gitea
    pmb-pf - git clone of my mail thing
    other - ref and non-sensitive files for dns

Setup cheat:

  • set up certbot dns (prod)
  • see tar of cert dir with script (prod)
  • flask vs uwsgi in backend compose section (prod)
  • build vs local image in pmb-pf compose section
  • git clone pmb-pf
  • copy example .env in root dir
  • copy example .env in pmb-pf
  • copy example conf in proxy
  • do pmb-pf setup, and adjust root .env
  • mind backend config db settings

Notes:

This repo is minimally-sensitive. Falling outside the repo dir structure are reference awesome-compose files used as baseline -- nginx-flask-mysql -- and certs, containing letsencrypt script. Script may be backed up into repo carefully, sanitizing any tkens.

Changing gitea subdomain:

Find in proxy/conf.
Find in gitea conf.
Rebuild images.

MariaDB backup:

mariadb-dump -uroot -pxxxx gitea > /bu/19840101.sql
mariadb -uroot -pxxxx gitea < /bu/19840101.sql

Todo:

  • gitea subdomain will require wildcard cert -- therefore "*.oily.dad" AND "oily.dad" DONE
  • move more stuff from backend config into root .env