https://github.com/itk-dev/foreningsmentor
https://github.com/itk-dev/foreningsmentor
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/itk-dev/foreningsmentor
- Owner: itk-dev
- License: gpl-2.0
- Created: 2018-09-25T14:12:55.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2026-01-13T09:05:07.000Z (2 months ago)
- Last Synced: 2026-01-13T11:39:56.308Z (2 months ago)
- Language: PHP
- Size: 3.78 MB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Foreningsmentor
[](https://woodpecker.itkdev.dk/repos/7)
[](https://github.com/itk-dev/foreningsmentor/releases)
[](https://github.com/itk-dev/foreningsmentor/actions/workflows/pr.yaml)
[](https://codecov.io/gh/itk-dev/foreningsmentor)
[](https://github.com/itk-dev/foreningsmentor/commits/develop/)
[](https://github.com/itk-dev/foreningsmentor/blob/develop/LICENSE)
## Local setup
### Copy development services definitions
```shell name="services-setup"
cp web/sites/development.services.yml web/sites/default/services.local.yml
```
### In (sites/default/settings.local.php) create file if it doesn't exist. Then copy the following over
```php name="settings-setup"
getenv('DATABASE_DATABASE') ?: 'db',
'username' => getenv('DATABASE_USERNAME') ?: 'db',
'password' => getenv('DATABASE_PASSWORD') ?: 'db',
'host' => getenv('DATABASE_HOST') ?: 'mariadb',
'port' => getenv('DATABASE_PORT') ?: '',
'driver' => getenv('DATABASE_DRIVER') ?: 'mysql',
'prefix' => '',
];
$settings['config_sync_directory'] = '../config/sync';
$settings['hash_salt'] = 'HASH_SALT';
$settings['trusted_host_patterns'] = [
'^foreningsmentor\.local\.itkdev\.dk$'
];
/**
* Add development service settings.
*/
if (file_exists(__DIR__ . '/services.local.yml')) {
$settings['container_yamls'][] = __DIR__ . '/services.local.yml';
}
/**
* Disable CSS and JS aggregation.
*/
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
/**
* Logging.
*/
$config['system.logging']['error_level'] = 'verbose';
/**
* Set default transport to smtp to make mailhog happy.
*/
$config['symfony_mailer.settings']['default_transport'] = 'smtp';
```
### Start docker comtainers, and install composer
```shell name="containers-and-composer-setup"
docker compose up -d
docker compose exec phpfpm composer install
```
... If error network frontend declared as external, but could not be found, then run the following:
```shell name="frontend-network"
docker network create frontend
```
And then try again.
### Install drupal and set user admin password to test
```shell name="site-setup"
docker compose exec phpfpm /app/vendor/bin/drush --yes site-install --existing-config
docker compose exec phpfpm /app/vendor/bin/drush upwd admin test
```
... If you get a *permission denied*,
go to
[web/custom/modules/foreningsmentor.module#351](https://github.com/itk-dev/foreningsmentor/blob/f8b5ab9da80743abb91fbd2e24c3f602ecfba0e4/web/modules/custom/foreningsmentor/foreningsmentor.module#L351)
and remove that function, and then rerun step 4:
### Create example content through fixtures
```shell name="fixtures-setup"
docker compose exec phpfpm /app/vendor/bin/drush en content_fixtures
docker compose exec phpfpm /app/vendor/bin/drush en foreningsmentor_fixtures
docker compose exec phpfpm /app/vendor/bin/drush content-fixtures:load -y
```