Getting Started
This page describes installing and running Ourchive locally for the purposes of development.
If you are planning to install Ourchive as a website, please refer to the admin docs.
Local Development with Docker
If you would like to do development with Docker containers, this is currently supported. Please visit Developing with Docker.
Local Development Native
Prerequisites
Heads Up
The below instructions assume you are installing on an Ubuntu machine. Similar commands should work for any Unix-based machine but are beyond the scope of this documentation.
- Python 3.x+
- Postgres 15+ docs
- Python 3.x+ dev tools
Regarding Virtual Environments
There’s more than one way to climb a tree and there’s more than one way to get a working Python development environment going. The below relies heavily upon best practices described in Python’s documentation.
Python & Postgres
Set up virtual environment
The below instructions assume you installed python3.11 following the instructions above. You can check to see what version of python your default ‘python’ installation points to:
If it outputs “Python 3.11.2” or any version higher than 3.11, the below instructions can look like python -m venv venv
.
If you have not created a virtual environment before, we strongly recommend reviewing (Python’s docs)[https://docs.python.org/3/library/venv.html].
- Create & activate the virtual environment
- Install requirements
Troubleshooting
You are pretty likely to get errors related to psygopg2
. Never fear, this is a common error and there are many resources on the internet to help you fix it.
If you get an install error for psycopg2
that references libpq-fe.h
:
Refer to the solve here.
If you have a different error, we strongly recommend searching for the error and seeing how others have solved it, as it is likely specific to your machine/version/distro/etc.
Run migrations
Load fixture data
Caution
Do not skip this step!
Ourchive is a configurable app. You need to load settings data or the app will not function properly!
Ourchive ships with fixture data for some necessary configurations and for convenience of development. You must load settings. You can load works, bookmarks, etc for the convenience of starting with a pre-loaded environment.
Run server
That’s it
You should now have a working installation of Ourchive.
Troubleshooting
“But I don’t”, you cry. Not to worry, it happens to the best of us. Here are some basic troubleshooting tips:
- Follow the error: Google the console and/or site output. Common issues include database connectivity, pip versioning issues, or python devtools problems.
- Delete everything and start over: Ourchive is a fairly simple app right now with minimal external dependencies. Sometimes a clean reinstall can help.
- Open an issue with the Ourchive team. We want to help!