|Keywords:||scale modeling, phpBB3, forum, albums, community|
Modelbrouwers.nl is a scale modeling community. The website hosts a phpBB3 board, albums software and a webshop.
This repository contains the majority of software powering the modelbrouwers.nl domain.
The main parts are the phpBB3 board and various apps built in Django, such as:
- album software, tightly integrated in the phpBB3 board
- Kit database with reviews
- Member projects portfolio
- phpBB3 administration through the Django admin.
There are three major parts involved in the modelbrouwers.nl website, each backed by their own containers and/or databases and interacting with each other.
docker-compose.yml to see how the services interact.
phpBB3 is an open-source forum built in PHP, and our choice or even origin story
for the community. See the
Dockerfile-forum for more details.
The Django project implements the user accounts, album software and any extra additions that are not available in phpBB3. Generally we avoid extensions to phpBB3 due to the increase in maintenance and challenges in quality control.
The backend build is specified in
The webshop is (for now) based on OpenCart. Modelbrouwers.nl does use some closed source
extensions which live in a private repository. This is orchestrated via the
opencart-extensions git submodule.
You need access to this repository to be able to build the
which is only given to trusted people directly involved with the project.
Setting up the development environment
Ensure you have the prerequisites installed on your system:
- PostgreSQL database server (django project)
- MySQL/MariaDB database server (phpBB3 and django project)
- Python 3.9
- NodeJS 16+/npm 8+
It is recommended to use a virtualenv.
Advanced users may also find inspiration in the Github CI configuration in
Installing the dependencies
Install the backend dependencies using pip:
pip install -r requirements/dev.txt
Configuring your environment
Configuration is mostly done through environment variables, which you can specify
.env file in the root of the project/repository.
For all available settings, check
src/brouwers/conf/base.py and look for the
config function calls.
Synchronizing the database(s)
You should also create a superuser for local development:
Starting the development server
You can either build the frontend once:
npm run build
or have the dev server watch for file changes and rebuild the frontend on every change:
Django comes with a development server included.
Start it by invoking:
Point your browser to http://127.0.0.1:8000. You should see a homepage.
For the frontend tooling, you can invoke
npm start which will watch for file changes
and compile the bundles.
Setting up local
We're currently on the 3.0.x branch. The 3.1.x versions have major backwards incompatible changes that our code needs adoption for.
The easiest way is probably to run this through the docker setup:
docker-compose up phpbb
Run all tests by executing:
src/manage.py test src
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
This setup uses your locally installed
node_modules and has the Django dev server
handle static files/assets, while reloading Python code when it changes.
Point your browser at http://localhost/phpBB3/ to view the forum, for example.