AxelUlmestig / organize.party

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

organize.party

Dependencies

you might need to install the following dependencies

sudo apt install -y libpq-dev zlib1g-dev postgresql postgresql-contrib

Get dependencies with Nix

  1. Install Nix and direnv
  2. Add direnv hook to your shell file, e.g.
    echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
  3. Run direnv allow in this repo

Run Locally

  1. Create env file cp .env.example .env add swap values as needed
  2. make build-fontend
  3. docker compose up -d db
  4. docker compose exec db sqitch --chdir db deploy
  5. make start-dev-backend
  6. Go to http://localhost:8081

Run in production

make deploy-production, this will run it on your local machine with the latest pushed image from dockerhub.

Set up daily database backups, crontab -e and add:

0 3 * * * cd /home/admin/organize.party && make backup-db

Set up SSL with Let's Encrypt

  1. make deploy-production
  2. docker compose run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d organize.party
  3. Schedule monthly renewal of the certificate: crontab -e and add (make sure to update the path to work with your setup):
    0 0 1 * * cd /home/admin/organize.party && docker compose run --rm certbot renew && docker compose restart nginx

It should now be possible to view https://organize.party with full SSL protection.