My progress so far running PieFed in an Ubuntu 22.04 VM
submitted freamon edited
byThis is probably just me, but I found INSTALL.md to be a bit confusing.
So, for a fresh install of Ubuntu in a Windows Hyper-V VM, this is the list of steps I took to get something that at least looks like it might be the right thing:
remove unattended-upgrades, and clean up after OS install
sudo systemctl stop unattended-upgrades
sudo apt-get purge unattended-upgrades
sudo apt autoremove
install postgresql 16
sudo apt install ca-certificates pkg-config
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt update
sudo apt install libpq-dev postgresql
install python libs
sudo apt install python3-pip python3-venv python3-dev python3-psycopg2
install redis server
sudo apt install redis-server
install git
sudo apt install git
set up database
sudo -iu postgres psql -c "CREATE USER pyfedi WITH PASSWORD 'pyfedi';"
sudo -iu postgres psql -c "CREATE DATABASE pyfedi WITH OWNER pyfedi;"
clone PieFed
git clone https://codeberg.org/rimu/pyfedi.git
cd into pyfedi, set up and enter virtual environment
cd pyfedi
python3 -m venv ./venv
source venv/bin/activate
use pip to install requirements
pip install wheel
pip install -r requirements.txt
edit .env file
cp env.sample .env
nano .env
(change SECRET_KEY to some random sequence of numbers and letters)
initialise database, and set up admin account
flask init-db
run the app
flask run
(open web browser at http://127.0.0.1:5000)
(log in with username and password from admin account)
Maybe this will help someone else (or maybe someone has spotted something that I missed - like I say: it looks right when loaded in a browser, but I'm not 100% sure)
Awesome, thank you very much.
Install.md needs a huge tidy up!
That's nice. My first attempt at getting the codeberg repo running failed, but I also didn't try to look too hard into it. Think I will be trying this next in an Ubuntu distrobox container
I didn't include 'export FLASK_ENV=development' in the post because I wasn't sure it made a difference. It still said 'debug mode = off' when running flask either way. I've since added 'FLASK_DEBUG = 1' to the .env file, and that's given me hot reloading.
Interesting, thanks
Hey. Just testing: does this comment reach you?
What is the removal of unattended-upgrades for ?
So Ubuntu on your VM doesn't upgrade without your explicit instructions.
Just to do with Ubunbu - it locks you out of using apt until it completes, which can be forever if you're running it in a VM.
One more dependency:
sudo apt install tesseract-ocr
I made this over at endlesstalk so I use Preview.
One curious thing:
Compare this to the original at https://endlesstalk.org/post/25687792 - about the 5th line down is '###### (nothing to do with PieFed, just some necessary Ubuntu weirdness)', but that's missing from this post.
Edit for more stray observations: This post and Blaze's comment have come through already at +2
This post and Blaze's comment made it from lemmy to here, but this comment hasn't made it back to endlesstalk.
Edit: about my comments not making it to lemmy - I think it's 'cos my account is broken, so that's a separate issue I'll ask about in a different post