Are you interested in helping build out this website? This page will help you get started!
Table of contents
- Get The Source
- Running The Website
- Running The Tests
- Making A Change To The Website
- Running Without Docker
The following are required to follow this guide:
- Docker Compose
- Optional: GNU make
The website is written with the Django web framework, which is itself written with Python. Knowledge of Python and/or web programming are nice, but not strictly required to contribute. Knowledge of how to use git is very beneficial.
Get The Source
You can download or clone the website source code from GitLab.
cd /some/path git clone https://gitlab.com/modding-openmw/modding-openmw.com
Running The Website
To run the website from your local source code:
cd /path/to/modding-openmw.com ./bin/docker-reset.sh docker-compose up --build momw-django --exit-code-from momw-django # Or: make docker-run
To run source code tests from your local source code:
cd /path/to/modding-openmw.com ./bin/docker-reset.sh docker-compose up --build momw-tests --exit-code-from momw-tests # Or: make docker-tests
Making A Change To The Website
If you have a change you'd like to see merged into the website codebase, the process looks something like this:
- Create a GitLab account if you don't already have one.
- Fork the website source code
- Push your changes to your fork
- Open a merge request
A website maintainer will be notified of your merge request and review it. From there, the path to merging depends on the nature of your change and the availability of maintainers to review and test the changes.
Running Without Docker
This method is for advanced users, it is not supported on Windows. Linux is strongly recommended and is what the text below is written for but it could be adapted for macs.
- Install postgresql client and server packages via your system package manager, ensure the server is running and usable
- Also install Firefox,
python3-psycopg2, and GNU make via your system package manager
- Download the geckodriver binary and extract it to some place that's in
- From the root of the website source code, run:
python3 -m pip install -r requirements.txt
- The next few steps require elevated privileges:
- Open an admin psql shell:
sudo -u postgres psql
- Create a user for your login user (replace with your actual username):
postgres=# create user johnnyhostile;
- Give database creation privileges:
postgres=# alter user johnnyhostile with createdb;
- Create a user for the application:
postgres=# create user momwdb password 'postgresqlpassword';
- Give database creation privileges part 2:
postgres=# alter user momwdb with createdb;
- Open an admin psql shell:
make reset server
At this point, you should be able to interact with the codebase as expected. To run tests, do:
make reset test