Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates for Drupal 10.3 and reorganization #59

Merged
merged 23 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3d6ab0b
Dependency updates for Drupal 10.3
simonbaese Dec 10, 2024
1b9a5cb
Code styling for new Drupal coding standards
simonbaese Dec 10, 2024
86f77c3
Code styling with updated ruleset
simonbaese Dec 10, 2024
6cc3a8a
Fixes after static analysis
simonbaese Dec 10, 2024
b5d123c
Change gitignore for sites folder
simonbaese Dec 11, 2024
6aa037e
Add crontab for local development
simonbaese Dec 11, 2024
4ead1d1
Reorganize project files and assets
simonbaese Dec 11, 2024
d814607
Update local install script to respect new file locations
simonbaese Dec 11, 2024
5bb6d33
Adjust extensions in code sniffer configuration
simonbaese Dec 11, 2024
7483a82
Use configuration synchronization
simonbaese Dec 11, 2024
769c6bd
Configuration permutations
simonbaese Dec 11, 2024
9379916
Set fixed UUIDs for consumers installation
simonbaese Dec 11, 2024
0b85547
Move certificate files to config folder
simonbaese Dec 11, 2024
383e86a
Add composer manifest
simonbaese Dec 11, 2024
70f9be1
Adjust config ignore settings
simonbaese Dec 11, 2024
6dbaebc
Add htaccess to certs folder
simonbaese Dec 11, 2024
6060eb4
Adjust PHPUnit configuration for DDEV
simonbaese Dec 11, 2024
091a463
Fix test for JSON:API obscurity prefix
simonbaese Dec 11, 2024
5b84362
Fix tests for project lifecycle
simonbaese Dec 11, 2024
62fdc47
Fix test for project API response
simonbaese Dec 11, 2024
7f7ecbe
Add DDEV specific PHPUnit configuration
simonbaese Dec 11, 2024
7577bb9
Do not fail PHPUnit tests on deprecations
simonbaese Dec 11, 2024
8ace197
Fix deprecations in PHPUnit tests
simonbaese Dec 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .ddev/addon-metadata/ddev-cron/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: ddev-cron
repository: ddev/ddev-cron
version: 1.8.0
install_date: "2024-12-11T17:58:34+01:00"
project_files:
- web-build/Dockerfile.ddev-cron
- web-build/cron.conf
- web-build/time.cron.example
global_files: []
removal_actions: []
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: youvo
type: drupal9
type: drupal10
docroot: web
php_version: "8.1"
webserver_type: nginx-fpm
Expand Down
18 changes: 18 additions & 0 deletions .ddev/web-build/Dockerfile.ddev-cron
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ddev-generated
# Install cron package; this can be done in webimage_extra_packages, but put it here for now.
RUN (apt-get update || true) && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests cron

# Copy our custom config
COPY ./cron.conf /etc/supervisor/conf.d/cron.conf

# Make it so you can add to cron.d without root privileges
RUN chmod 777 /etc/cron.d /var/run

# Copy over our custom jobs
COPY ./*.cron /etc/cron.d/

# Give execution rights on the cron jobs
RUN chmod -f 0644 /etc/cron.d/*.cron || true

# Concatenate files
RUN { cat /etc/cron.d/*.cron; } | crontab -u ${username} -
8 changes: 8 additions & 0 deletions .ddev/web-build/cron.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ddev-generated
[program:cron]
command=sudo /usr/sbin/cron -f -L7
autorestart=true
startretries=10
stdout_logfile=/proc/self/fd/2
stdout_logfile_maxbytes=0
redirect_stderr=true
1 change: 1 addition & 0 deletions .ddev/web-build/drupal.cron
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*/10 * * * * IS_DDEV_PROJECT=true DDEV_PHP_VERSION=8.1 /var/www/html/vendor/bin/drush cron
17 changes: 0 additions & 17 deletions .editorconfig

This file was deleted.

61 changes: 0 additions & 61 deletions .gitattributes

This file was deleted.

19 changes: 15 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
/vendor/
/.idea/
.DS_Store
.phpunit.result.cache
.editorconfig
.gitattributes

/.ddev/.env

/config/.env.api
/config/.env.consumers.development
/config/.env.development
/config/.env.oauth_remote.development
/config/.env.production
/certificates/private.key
/certificates/public.key
/certificates/youvo7.key
/config/certs/private.key
/config/certs/public.key
/config/certs/youvo7.key

/private
/tmp

/vendor/
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<h1 align="center">Backend</h1>
<p align="center">
<img width="200" src="/resources/logo.png" alt="youvo Logo">
<img width="200" src="/web/assets/logo.png" alt="youvo Logo">
</p>

## :wave: &nbsp;Introduction

Backend repository for youvo based on Drupal 9.
Backend repository for youvo based on Drupal 10.

### What is happening here?

We are building the new backend for [youvo.org](https://www.youvo.org) - a platform that connects social organizations with creatives for skill-based volunteering projects. The backend of the main platform runs on Drupal 7. We are migrating to a decoupled stack with Drupal 9 and Remix. The current development phase is until the end of June. Most of the features are still in early development and highly unstable. The Academy is running as a beta on [beta.youvo.org](https://beta.youvo.org/academy) (after registration).
We are building the new backend for [youvo.org](https://www.youvo.org) - a platform that connects social organizations with creatives for skill-based volunteering projects. The backend of the main platform runs on Drupal 7. We are migrating to a decoupled stack with Drupal 10 and Remix. The current development phase is until the end of June. Most of the features are still in early development and highly unstable. The Academy is running as a beta on [beta.youvo.org](https://beta.youvo.org/academy) (after registration).

### How to contact us?

Expand All @@ -21,8 +21,8 @@ We are not using the issue queue in this repository, yet. Just write an email to

For the local development environment, we use DDEV based on Docker. For the system requirements, please see [DDEV docs](https://ddev.readthedocs.io/en/stable/).

Tested on Linux with `Ubuntu 22.04.2 LTS` `composer 2.5.5` `docker 23.0.3` `ddev 1.21.6`.
Tested on macOS with `macOS Monterey 12.3` `composer 2.2.9` `docker desktop 4.6.1` `ddev 1.19.1`.
Tested on Linux with `Ubuntu 22.04.2 LTS` `composer 2.8.4` `docker 27.4.0` `ddev 1.24.0`.
Tested on macOS with `macOS Sequoia 15.1.1` `composer 2.8.4` `docker desktop 4.36.0` `ddev 1.24.0`.

Further installation steps may be required to set up SSH agent and XDebug, see [DDEV troubleshooting](https://ddev.readthedocs.io/en/stable/users/troubleshooting/).

Expand All @@ -38,11 +38,13 @@ cd youvo-backend
git clone git@github.com:youvo/backend.git .
# You may need to set up some configuration - see below.
ddev config --auto
# Optional crontab for local development.
ddev add-on get ddev/ddev-cron
ddev composer install
./scripts/install-local.sh
```

Navigate to https://youvo.ddev.site:844/user/login and login with `admin@youvo.org:admin`.
Navigate to https://youvo.ddev.site:8443/user/login and login with `admin@youvo.org:admin`.

## :hammer_and_wrench: &nbsp;Local Configuration and Development Setup

Expand All @@ -54,14 +56,21 @@ Navigate to https://youvo.ddev.site:844/user/login and login with `admin@youvo.o
- OAuth Remote configuration `config/.env.oauth_remote.development`
- API configuration `config/.env.api`
- XDebug port `.ddev/php/xdebug_client_port.ini`
- Simple OAuth certificates, see `config/certs/README.md`

Adjust the config path in `web/sites/default/settings.php` such that `$settings['config_sync_directory'] = '../config/sync'`;.

Set `$settings['file_public_path'] = 'files';`.
Set `$settings['file_assets_path'] = 'files';`.
Set `$settings['file_private_path'] = '../private';`.

Note that some of the environment variables files will be merged in the future. We entertain some separation at the moment for development purposes.

### DDEV Commands

```bash
ddev help # show commands help
ddev drush foo # execute drush commands
ddev drush foo # execute Drush commands
ddev status # show status of containers
ddev start # start containers
ddev stop # destroy containers
Expand All @@ -70,9 +79,9 @@ ddev logs # show php logs

### phpMyAdmin

Navigate to https://youvo.ddev.site:8037 and login with `db:db`. The database is `youvo_local`.
Install via `ddev add-on get ddev/ddev-phpmyadmin` and navigate to https://youvo.ddev.site:8037 and login with `db:db`. The database is `youvo_local`.

### Folder Permissions Troubleshooting
### Folder permissions Troubleshooting

In some system configurations dummy content folders require further permissions.

Expand All @@ -81,7 +90,9 @@ cd web/sites/default/files
chmod 0666 -R academy projects creatives organizations
```

### PHPStorm connection to database
### PHPStorm Connection to Database

You may use the DDEV Integration plugin or configure the database connection as follows.

- Host: `localhost`
- Port: `59002`
Expand Down
Loading
Loading