Dump existing data:
python3 manage.py dumpdata > datadump.json
Change settings.py to Postgres backend.
Make sure you can connect on PostgreSQL. Then:
# /etc/caddy/Caddyfile | |
api.example.com:443 { | |
route { | |
@options method OPTIONS | |
handle @options { | |
header Access-Control-Allow-Origin "https://clientwebsite.com" | |
header Access-Control-Allow-Methods "POST" | |
header Access-Control-Allow-Headers "authorization" | |
header Access-Control-Allow-Credentials true |
function getCsrf() { | |
var inputElems = document.querySelectorAll('input'); | |
var csrfToken = ''; | |
for (i = 0; i < inputElems.length; ++i) { | |
if (inputElems[i].name === 'csrfmiddlewaretoken') { | |
csrfToken = inputElems[i].value; | |
break; | |
} | |
} | |
return csrfToken; |
// navigate to about:serviceworkers first | |
// then run: | |
for (let k of document.querySelectorAll("[data-l10n-id='unregister-button']")) k.click() |
sudo apt update | |
sudo apt install -y vim git python3-dev gcc g++ make unzip tree python3.10-venv iftop ripgrep | |
sudo -v ; curl https://rclone.org/install.sh | sudo bash | |
mkdir -p ~/.config/rclone/ | |
vim ~/.config/rclone/rclone.conf | |
# ~/.config/rclone/rclone.conf | |
[r2] |
{ | |
"editor.bracketPairColorization.enabled": true, | |
"editor.cursorStyle": "block", | |
"editor.dragAndDrop": false, | |
"editor.hover.enabled": false, | |
"editor.linkedEditing": false, | |
"editor.minimap.enabled": true, | |
"editor.minimap.showSlider": "always", | |
"editor.minimap.size": "fill", | |
"editor.renderWhitespace": "selection", |
[Unit] | |
Description=uWSGI Emperor service | |
After=syslog.target | |
[Service] | |
ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/emperor.ini | |
Restart=always | |
KillSignal=SIGQUIT | |
Type=notify | |
NotifyAccess=all |
# default target so running 'make' by itself wll download and build nginx | |
build: nginx | |
cd nginx && ./configure --with-pcre=../pcre2 && make | |
nginx: pcre2 | |
curl -O https://nginx.org/download/nginx-1.21.6.tar.gz | |
tar -xzvf nginx-*.tar.gz | |
mv nginx-*/ nginx | |
rm nginx-*.tar.gz |
# /Users/sirodoht/Library/Application Support/lazygit/config.yml | |
gui: | |
theme: | |
lightTheme: true | |
showFileTree: false | |
mouseEvents: false | |
skipStashWarning: false | |
showRandomTip: false | |
showCommandLog: false |
## | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
127.0.0.1 localhost | |
255.255.255.255 broadcasthost | |
::1 localhost |