Deprecation Notice: This repository is no longer actively maintained.
The docker-compose file creates four containers:
- An nginx load balancer
- A PHP server
- A MariaDB database
- A node container
Build and run these images with docker-compose:
docker compose up --build -d
The container will have appropriate volume bindings with ./app
.
composer
is the dependency manager used for PHP. Install the dependencies on the PHP docker container:
docker compose run --rm php82-service composer install
Do the same for the node dependencies in the node container. Do this after you install the composer dependencies as it mutates packages.json:
docker compose run --rm node-service yarn install --force
Create the database by executing:
docker compose run --rm php82-service symfony console doctrine:database:create
Create the schema with:
docker compose run --rm php82-service symfony console doctrine:migrations:migrate
Build some files needed for the frontend:
docker compose run --rm node-service yarn build
And finally populate the DB with some test data:
docker compose run --rm php82-service symfony console doctrine:fixtures:load
Create a new file .env.local
and insert here the testing MOLLIE_API_KEY
:
echo MOLLIE_API_KEY=test_................................. > .env.local
The default admin ID is 1, but be wary that each time you run the fixtures, this ID will be incremented because of auto-increment options in the database.
Go to http://localhost:8080/
and you should be greeted by the MijnRood login page.
Admin level:
- Name:
Admin de Baas
- E-mail:
admindebaas@example.com
- Password:
admin
Group head level:
- Name:
Jan Jansen
- E-mail:
janjansen@example.com
- Password:
contact
- Member off:
Noorderhaaks
- Head off:
Noorderhaaks
Member level:
- Name:
Henk de Vries
- E-mail:
henkdevries@example.com
- Password:
new_member
- Member off:
Nooderhaaks
To deploy updates on the server:
sudo -u deploy -i
docker compose -f docker/prod/docker-compose.yml --env-file .env.local down
git pull
docker compose -f docker/prod/docker-compose.yml --env-file .env.local up --build -d
If there are changed migrations, there is an extra step:
docker compose -f docker/prod/docker-compose.yml --env-file .env.local exec mijnrood_php bin/console doctrine:migrations:migrate
To add a custom welcome email, put the templates (html and plain text) in templates/custom/email
.
Supported override templates are:
welcome.html.twig
,welcome.html.txt.twig
welcome_support-en.html.twig
,welcome_support-en.txt.twig
welcome_support-nl.html.twig
,welcome_support-nl.txt.twig
apply.html.twig
,apply.txt.twig
fresh_member.txt.twig
contact_new_member.html.twig
,contact_new_member.txt.twig
You can generate new migrations with:
docker compose run --rm php82-service symfony console doctrine:migrations:diff
Make sure the output is as you expected, and change it if necessary!
This project is licensed under the EUPL, the license text in English can be found in the LICENSE
file.
For more information about the EUPL and the license text in other languages, see their website: https://www.eupl.eu