#!/bin/bash

php bin/wait-for-db.php
vendor/bin/laminas rebuild-database
vendor/bin/laminas load-data-fixtures --path=module/eCampCore/data/*

apache2-foreground

#!/bin/bash
set -euo pipefail

php bin/wait-for-db.php
vendor/bin/laminas rebuild-database
vendor/bin/laminas load-data-fixtures --path=module/eCampCore/data/*
rm -rf data/DoctrineORMModule

apache2-foreground

Remove DoctrineORMModule directory after recreating the database
Remove DoctrineORMModule directory after recreating the database

The database reset commands run on container initialization as root.
Since these commands also create the Doctrine proxies, the proxy files
are then owned by root. This becomes a problem later when a www-data
owned process tries to write to the proxy directory. However if we just
remove everything that the console commands have created in the data
directory, www-data can create its own proxy files and works happily.
