Merge pull request 'Minor improvements to docs and theme' (#160) from rscmbbng/pyfedi:main into main

Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/160
This commit is contained in:
rimu 2024-04-16 20:58:43 +00:00
commit ee7135e081
3 changed files with 13 additions and 2 deletions

View file

@ -214,6 +214,13 @@ Once you have ngrok working, edit the `.env` file and change the `SERVER_NAME` v
## Running PieFed in production ## Running PieFed in production
Running PieFed in production relies on several additional packages that need to be installed.
```bash
source venv/bin/activate #if not already in virtual environment
pip3 install gunicorn celery
```
Copy `celery_worker.default.py` to `celery_worker.py`. Edit `DATABASE_URL` and `SERVER_NAME` to have the same values as in `.env`. Copy `celery_worker.default.py` to `celery_worker.py`. Edit `DATABASE_URL` and `SERVER_NAME` to have the same values as in `.env`.
Edit `gunicorn.conf.py` and change `worker_tmp_dir` if needed. Edit `gunicorn.conf.py` and change `worker_tmp_dir` if needed.

View file

@ -1,4 +1,8 @@
{% extends 'base.html' %} {% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
{% from 'bootstrap/form.html' import render_form %} {% from 'bootstrap/form.html' import render_form %}
{% block app_content %} {% block app_content %}

View file

@ -270,7 +270,7 @@
<script type="text/javascript" src="{{ url_for('static', filename='js/markdown/downarea.js', changed=getmtime('js/markdown/downarea.js')) }}"></script> <script type="text/javascript" src="{{ url_for('static', filename='js/markdown/downarea.js', changed=getmtime('js/markdown/downarea.js')) }}"></script>
{% endif %} {% endif %}
{% if theme() and file_exists('app/templates/themes/' + theme() + '/scripts.js') %} {% if theme() and file_exists('app/templates/themes/' + theme() + '/scripts.js') %}
<script src="{{ url_for('static', filename='themes/' + theme() + '/scripts.js') }}" /> <script src="{{ url_for('static', filename='themes/' + theme() + '/scripts.js') }}"></script>
{% endif %} {% endif %}
{% block end_scripts %} {% block end_scripts %}