Commit Graph

111 Commits

Author SHA1 Message Date
wotnak a2bd7136cf Configure www service to wait for db service to be healthy instead of only started #758 2023-12-22 06:17:47 -05:00
wotnak 1773a2eae5 Add healthcheck to MariaDB container to ensure it is ready to accept external connections before reporting as ready #758 2023-12-22 06:17:37 -05:00
Michael Stenta 485908beb0 Fix composer require farmos/farmos version constraint in build-farmOS.sh. 2023-11-27 13:40:49 -05:00
Michael Stenta c0804bb22d Only add farmOS repository to composer.json for non-tag versions. 2023-11-27 13:40:23 -05:00
AlMaVizca 9d5f8244ed Build PHP dependencies in one stage. 2023-11-06 09:55:22 -05:00
AlMaVizca e7774c5321 Use a multi-stage Docker image build process and clean up dependencies. 2023-11-06 09:55:09 -05:00
AlMaVizca eb52d4ff2d Move configuration to separate files to improve Dockerfile legibility. 2023-11-06 09:55:09 -05:00
AlMaVizca 949f69269d Use docker-php-ext-enable to enable XDebug extension. 2023-11-06 09:55:09 -05:00
AlMaVizca 3ffeabf862 Change mode of docker-entrypoint.sh to 755 in repo instead of using chown in Dockerfile. 2023-11-06 09:55:09 -05:00
AlMaVizca bd85806f5b No longer necessary to make /usr/share/man directories for postgresql-client. 2023-11-06 09:55:09 -05:00
Michael Stenta 3d1f5ba984 Rearrange build-farmOS.js ${FARMOS_COMPOSER_VERSION} assignment logic.
There is no functional change. This just rearranges the if/elif/else
logic into a more intuitive order.
2023-11-03 13:13:38 -04:00
Michael Stenta a74ec6ad0c Fix issue with build-farmOS.sh tagged releases.
Previously ${FARMOS_COMPOSER_VERSION} was not being set for
tagged releases, causing `composer require farmos/farmos`
to run without a version constraint. This worked for 2.x
releases because it would default to the latest stable release.

This does not work for 3.0.0-betaX releases, because they are
not considered "stable" by Composer, so it falls back on the
latest stable 2.x release (2.2.2).
2023-11-03 11:18:17 -04:00
Michael Stenta 7c73c28626 Ignore Symfony deprecations helper during tests. 2023-10-30 12:07:29 -04:00
Michael Stenta 50803a5c83 Run PHPCompatibility sniff for PHP 8.2+. 2023-10-30 12:07:29 -04:00
Michael Stenta 67b22eee47 Issue #3270558: Install and create the postgres pg_trgm extension in docker container 2023-10-30 12:07:29 -04:00
Michael Stenta a183e648af Update PHPCodesniffer drupal_core_version to 10. 2023-10-30 12:07:29 -04:00
Michael Stenta 5e6a428eb9 Update Drupal core to 10.1.5. 2023-10-30 12:07:28 -04:00
Michael Stenta 8e6efe656e Inherit from the Drupal 10 image on Docker Hub. 2023-10-27 13:27:01 -04:00
Michael Stenta e417ee9ad6 Change all references of 2.x to 3.x in code, docs, and workflows. 2023-10-27 09:25:10 -04:00
Michael Stenta 131c2a54ba Use php-geos GitHub repo mirror for Docker builds.
The official repo (https://git.osgeo.org/gitea/geos/php-geos)
has been failing git clone during GitHub Actions recently.
Using the GitHub mirror will reduce the load we are putting
on OSGeo's self-hosted servers too.
2023-05-19 08:10:54 -04:00
Michael Stenta 21d2d2a6e4 Replace all usages of docker-compose with docker compose. 2023-03-30 09:43:07 -04:00
Michael Stenta 637843aabf Exclude PHP CodeSniffer rule: Drupal.InfoFiles.AutoAddedKeys.Version Project
We intentionally include the project in farm.info.yml, because we handle
packaging ourselves via GitHub Actions.

This line was added in https://www.drupal.org/project/farm/issues/3336698

This caused the following CodeSniffer warning:

FILE: /opt/drupal/web/profiles/farm/farm.info.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added
   |         | by drupal.org packaging automatically
----------------------------------------------------------------------
2023-01-27 16:30:24 -05:00
Michael Stenta 45ef7ba4c7 Inherit from the official drupal:9.5 Docker image. 2022-12-16 12:19:39 -05:00
Michael Stenta 329ab9cfb4 Inherit from drupal:9.4 Docker image (for https://github.com/farmOS/farmOS/pull/566). 2022-11-28 08:50:29 -05:00
Michael Stenta 6686e1a1c3 Clone php-geos repository at the latest commit that adds PHP 8 support.
PHP 8 support has been added upstream. See:

https://git.osgeo.org/gitea/geos/php-geos/issues/26
https://git.osgeo.org/gitea/geos/php-geos/issues/27
2022-11-28 08:50:29 -05:00
Michael Stenta ae3bb892cd Patch php-geos for PHP 8 compatibility.
See https://git.osgeo.org/gitea/geos/php-geos/issues/26#issuecomment-8988
2022-11-28 08:50:29 -05:00
Michael Stenta ec354218df Inherit from drupal:9.3 Docker image (PHP 8). 2022-11-28 08:50:29 -05:00
Michael Stenta 80c6516c76 Check PHP 7.4+ compatibility with PHPCompatibility codesniffer extension. 2022-11-12 12:30:30 -05:00
Michael Stenta 4518cf4557 Update XDebug documentation to recommend discover_client_host=yes. 2022-11-12 10:29:57 -05:00
Michael Stenta 169df4f51c Remove unnecessary call to phpcs --config-set installed_paths.
The dealerdirect/phpcodesniffer-composer-installer plugin handles
this for us automatically now.
2022-11-12 10:25:58 -05:00
Michael Stenta 757399438f Tell PHPStan where to find GeoPHP classes.
This fixes the following errors:

- Property Drupal\farm_geo\GeometryWrapper::$geometry has unknown class Geometry as its type.
- Parameter $geometry of method Drupal\farm_geo\GeometryWrapper::__construct() has invalid type Geometry.
- Instantiated class GeometryCollection not found.
2022-09-13 10:23:48 -04:00
Michael Stenta bc92cb4714 Ignore "Unsafe usage of new static()" PHPStan errors.
See https://www.drupal.org/docs/develop/development-tools/phpstan/handling-unsafe-usage-of-new-static
2022-09-12 19:38:25 -04:00
Michael Stenta eedcc16115 Configure PHPStan via phpstan.neon.
See https://www.drupal.org/docs/develop/development-tools/phpstan/getting-started
2022-09-12 19:38:25 -04:00
Michael Stenta a0accbd38f Add PHPStan dependencies: phpstan/phpstan, phpstan/phpstan-deprecation-rules, phpstan/extension-installer, mglaman/phpstan-drupal. 2022-09-12 19:38:23 -04:00
Paul Weidner e6f1c85c8f Allow dealerdirect/phpcodesniffer-composer-installer composer plugin. 2022-06-14 13:27:26 -04:00
Paul Weidner 5c764c5b50 Pin selenium/standalone-chrome to 4.1.2-20220217. #514 2022-04-07 11:24:01 -04:00
Michael Stenta dd6858c86c Include slevomat/coding-standard in phpcs installed_paths config. Fixes #498 2022-01-31 06:44:47 -05:00
Paul Weidner bef4f25032 Add allow-plugins config #467 2022-01-03 15:53:30 -05:00
Michael Stenta 394daa9f06 Reference non-existent farmos/farmos:2.x.y Docker tag in production hosting docs/examples.
By doing this, we will be forcing the end-user to follow best
practice by making an intentional decision about the version
they will use. We do not want farmos/farmos:2.x to be referenced
by default in the docs, otherwise we will be directing folks to
use the development branch, which may not be stable, and may
change if they update the image via `docker pull`. We also don't
want to recommend farmos/farmos:latest, for a similar reason:
when updating between versions it is important to manually run
update.php. By forcing intentional version use and updates, we
encourage best practice for updates as well.
2021-12-23 07:10:22 -05:00
Michael Stenta 73c3740322 Change docs.farmOS.org references to farmOS.org. 2021-12-23 06:56:37 -05:00
Michael Stenta deb59bed54 Set version in farm.info.yml via build-farmOS.sh.
This ensures that the version is correctly set in the
Docker images. Previously, it was only being set in
the packaged tarball releases.
2021-12-09 09:58:57 -05:00
Paul Weidner 59673a5b64 Only change the www-data ID right before it is needed. #457 2021-10-18 09:10:17 -04:00
Michael Stenta b3d62baf33 Set PHP expose_php to Off. 2021-09-14 14:44:15 -04:00
Michael Stenta 38fe21bdb2 Set PHP post_max_size and upload_max_filesize to 100M. 2021-09-14 14:43:54 -04:00
Michael Stenta 2bc77bb4b2 Remove test-runner service. 2021-09-02 14:44:51 -04:00
Michael Stenta 36fb1809fc Run tests in www service instead of test-runner. 2021-09-02 14:44:26 -04:00
Michael Stenta e8702df7ac Disable XDebug in testing services. 2021-09-02 14:30:19 -04:00
Michael Stenta cabae65179 Set Apache ServerName directive globally to suppress AH00558 message. 2021-08-25 06:19:33 -04:00
paul121 fee51113a6 Add chrome service definition to docker-compose.development.yml. 2021-08-23 09:18:57 -04:00
paul121 13f0787edd Test execution should fail on incomplete or skipped tests. 2021-08-23 09:18:57 -04:00