From 3fa379d32ba4fefed670768cb16054b4b1e5fd73 Mon Sep 17 00:00:00 2001 From: HaGuesto Date: Mon, 4 May 2026 15:00:51 +0200 Subject: [PATCH] fixes after recent set-up --- .docker/php/xdebug.ini | 2 -- README.md | 24 ++++++++++++++---------- docker-compose.yml | 2 ++ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.docker/php/xdebug.ini b/.docker/php/xdebug.ini index 2a41e7d13..74c749f44 100644 --- a/.docker/php/xdebug.ini +++ b/.docker/php/xdebug.ini @@ -5,5 +5,3 @@ xdebug.mode=develop,debug xdebug.client_host=host.docker.internal xdebug.client_port=9003 xdebug.start_with_request=yes -xdebug.discover_client_host=1 -xdebug.idekey=VSCODE diff --git a/README.md b/README.md index 59850c143..0a01b7f18 100644 --- a/README.md +++ b/README.md @@ -19,21 +19,16 @@ If you are interested in being part of this project, write us at [jointheteam@bo - Install [Docker](https://www.docker.com/products/docker-desktop) - Install [PHP 8.2 or later](https://www.php.net/downloads.php). -- Ensure you have the `mbstring`, `curl`, `mysql` and `xdebug` PHP extensions installed. On Ubuntu: +- Install ['composer'](https://getcomposer.org/doc/00-intro.md) (we suggest making it available globally) +- Ensure you have the `mbstring`, `curl`, `mysql` and `xdebug` PHP extensions (fiiting the php version you installed) installed. On Ubuntu: apt install php-curl php-mbstring php-mysql php-xdebug ### How do I get set up? -0. Clone this repo. If you're running Ubuntu, you may need to set write permissions to the templates folder for Docker. +1. Clone this repo. If you're running Ubuntu, you may need to set write permissions to the templates folder for Docker. git clone https://github.com/boxwise/dropapp - chmod -R 777 dropapp/templates (not generally recommended - ToDo Fix bug for Ubuntu users) - -1. You first need to install 'composer' (we suggest making it available globally) - - curl -s https://getcomposer.org/installer | php - mv composer.phar /usr/local/bin/composer 2. You can install the required dependencies then using @@ -49,13 +44,20 @@ If you are interested in being part of this project, write us at [jointheteam@bo php -S localhost:8000 gcloud-entry.php -5. To initialize the database for the first time, you should run this command to create the schema: +5. Please access the docker container, create the folder for the compiled smarty templates and give access to the container PHP user to write to the folder + + docker compose exec web sh + mkdir -p /var/www/html/templates/templates_c + chown -R www-data:www-data /var/www/html/templates/templates_c + chmod -R 775 /var/www/html/templates/templates_c + +6. To initialize the database for the first time, you should run this command to create the schema: vendor/bin/phinx migrate -e development The database seed `db/init.sql` is generated in v2 and copied from there. -6. If you want to additionally want to connect the users from the seed to auth0 and populate the db table cms_usergroups_roles then open a browser and request `http://localhost:8100/cron/reseed-auth0.php` +7. Request `http://localhost:8100/cron/reseed-auth0.php` to populate the `cms_usergroups_roles` db table to have your users in the db in sync with auth0. ### Accessing the app @@ -128,6 +130,8 @@ Enter the address in `docker-compose.yaml` here: environment: XDEBUG_CONFIG: remote_host=172.19.0.1 +You might also check your firewall if the port 9003 is open. + ### Database and migrations #### Command-line access diff --git a/docker-compose.yml b/docker-compose.yml index f951e983a..e9174eeb1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,8 @@ services: - ./.docker/php/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini ports: - "8100:80" + extra_hosts: + - "host.docker.internal:host-gateway" environment: # set to empty, so we don't initialize GCP specific config # as we have no auth set locally