Departure from our old symfony internal site
If you're running for the first time, the order of the steps is somewhat important.
- First you need to install the python dependencies.
- Then you should set up the database, including the migrations, see below.
- Then you install the frontend dependencies and build the styling.
- Finally you can run the webserver and worker, see Run webserver.
You have to make sure you have postgresql installed and running.
The default settings.py file is configured to use a database named symfexit
with the current (unix) user.
You can change many of the settings using environment variables. Read the settings.py file to see which settings are configurable that way.
If you want to use the default settings on your local machine run these commands after you started postgresql:
createuser $(whoami)
createdb -O $(whoami) symfexit
Then you can run the migrations:
python src/manage.py migrate
To login to the website and admin page, you can create a superuser for yourself:
python src/manage.py createsuperuser
Check that you have at least python 3.11 installed:
python3 --version
Make a virtualenv:
python3 -m venv ./venv
Activate the virtualenv:
source ./venv/bin/activate
Install the dependencies:
pip install -e .
Then for the styling you also need javascript dependencies (for tailwind):
cd src/theme/static_src
npm install
Build the styling once:
npm run build
Or run the watcher to build the styling every time you save a file, this is useful if you're working on the html templates and adding new classes, as new classes will need to be compiled into the css file:
npm run dev
python src/manage.py runserver
The default port is 8000, so you will be able to visit the site at: http://localhost:8000 The admin site is at: http://localhost:8000/admin
python src/manage.py startworker