build: update configuration files
This commit is contained in:
parent
62bb4776d3
commit
1c8d5c87f9
|
@ -1,31 +1,2 @@
|
|||
/.editorconfig
|
||||
/.gitattributes
|
||||
/vendor/
|
||||
/web/.csslintrc
|
||||
/web/.eslintignore
|
||||
/web/.eslintrc.json
|
||||
/web/.ht.router.php
|
||||
/web/.htaccess
|
||||
/web/INSTALL.txt
|
||||
/web/README.md
|
||||
/web/autoload.php
|
||||
/web/core/
|
||||
/web/example.gitignore
|
||||
/web/index.php
|
||||
/web/modules/README.txt
|
||||
/web/profiles/README.txt
|
||||
/web/robots.txt
|
||||
/web/sites/*/files/
|
||||
/web/sites/*/private/
|
||||
/web/sites/*/services*.yml
|
||||
/web/sites/*/settings*.php
|
||||
/web/sites/README.txt
|
||||
/web/sites/default/default.services.yml
|
||||
/web/sites/default/default.settings.php
|
||||
/web/sites/development.services.yml
|
||||
/web/sites/example.settings.local.php
|
||||
/web/sites/example.sites.php
|
||||
/web/sites/simpletest/
|
||||
/web/themes/README.txt
|
||||
/web/update.php
|
||||
/web/web.config
|
||||
/.github
|
||||
/README.md
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
# Do not edit this file. It is automatically generated by 'build-configs'.
|
||||
|
||||
export DOCKER_UID=1000
|
||||
|
||||
export COMPOSE_PROJECT_NAME=docker-example-drupal
|
||||
export COMPOSE_PROFILES=web,php,database
|
||||
|
||||
export DOCKER_WEB_VOLUME=.:/app
|
||||
|
||||
export MYSQL_DATABASE=drupal
|
||||
export MYSQL_PASSWORD=drupal
|
||||
export MYSQL_USER=drupal
|
||||
|
|
27
Dockerfile
27
Dockerfile
|
@ -1,29 +1,46 @@
|
|||
# Do not edit this file. It is automatically generated by 'build-configs'.
|
||||
|
||||
FROM php:8.1-fpm-bullseye AS base
|
||||
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
RUN which composer && composer -V
|
||||
|
||||
ARG DOCKER_UID=1000
|
||||
ENV DOCKER_UID="${DOCKER_UID}"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV PATH="${PATH}:/app/vendor/bin"
|
||||
RUN adduser --disabled-password --uid "${DOCKER_UID}" app \
|
||||
&& chown app:app -R /app
|
||||
|
||||
COPY composer.* ./
|
||||
USER app
|
||||
|
||||
ENV PATH="${PATH}:/app/bin:/app/vendor/bin"
|
||||
|
||||
COPY --chown=app:app composer.* ./
|
||||
|
||||
################################################################################
|
||||
|
||||
FROM base AS build
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update -yqq \
|
||||
&& apt-get install -yqq --no-install-recommends \
|
||||
git libpng-dev libzip-dev mariadb-client unzip
|
||||
|
||||
RUN docker-php-ext-install gd pdo_mysql zip
|
||||
|
||||
COPY --chown=app:app phpunit.xml* ./
|
||||
|
||||
|
||||
|
||||
USER app
|
||||
|
||||
RUN composer validate
|
||||
RUN composer install
|
||||
|
||||
COPY tools/docker/images/php/root /
|
||||
COPY --chown=app:app tools/docker/images/php/root /
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint-php"]
|
||||
CMD ["php-fpm"]
|
||||
|
@ -32,13 +49,15 @@ CMD ["php-fpm"]
|
|||
|
||||
FROM base AS test
|
||||
|
||||
COPY . .
|
||||
COPY --chown=app:app . .
|
||||
|
||||
RUN parallel-lint src --no-progress \
|
||||
&& phpcs -vv \
|
||||
&& phpstan \
|
||||
&& phpunit --testdox
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
FROM nginx:1 as web
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Do not edit this file. It is automatically generated by 'build-configs'.
|
||||
|
||||
x-app: &default-app
|
||||
volumes:
|
||||
- "${DOCKER_WEB_VOLUME:-./web:/app/web}"
|
||||
|
@ -32,12 +34,14 @@ services:
|
|||
`${COMPOSE_PROJECT_NAME}.localhost`,
|
||||
)"
|
||||
profiles: [web]
|
||||
|
||||
|
||||
php:
|
||||
<<: *default-app
|
||||
build:
|
||||
context: .
|
||||
target: build
|
||||
volumes:
|
||||
- .:/app
|
||||
depends_on:
|
||||
- database
|
||||
profiles: [php]
|
||||
|
@ -57,14 +61,10 @@ services:
|
|||
- "traefik.enabled=false"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: true
|
||||
MYSQL_DATABASE: drupal
|
||||
MYSQL_PASSWORD: drupal
|
||||
MYSQL_USER: drupal
|
||||
profiles: [database]
|
||||
|
||||
volumes:
|
||||
db-data: {}
|
||||
|
||||
networks:
|
||||
web:
|
||||
name: traefik_proxy
|
||||
|
|
8
justfile
8
justfile
|
@ -1,3 +1,5 @@
|
|||
# Do not edit this file. It is automatically generated by 'build-configs'.
|
||||
|
||||
default:
|
||||
@just --list
|
||||
|
||||
|
@ -7,5 +9,11 @@ composer *args:
|
|||
drush *args:
|
||||
just _exec php drush {{ args }}
|
||||
|
||||
install *args:
|
||||
just _exec php drush site:install -y {{ args }}
|
||||
|
||||
|
||||
|
||||
|
||||
_exec +args:
|
||||
docker compose exec {{ args }}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- Do not edit this file. It is automatically generated by 'build-configs'. -->
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="docker-example-drupal coding standards">
|
||||
<description>PHPCS configuration file for docker-example-drupal.</description>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Do not edit this file. It is automatically generated by 'build-configs'.
|
||||
|
||||
parameters:
|
||||
level: max
|
||||
paths:
|
||||
|
|
|
@ -1,20 +1,37 @@
|
|||
<!-- Do not edit this file. It is automatically generated by 'build-configs'. -->
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
cacheResultFile=".phpunit.cache/test-results"
|
||||
executionOrder="depends,defects"
|
||||
forceCoversAnnotation="false"
|
||||
beStrictAboutCoversAnnotation="true"
|
||||
beStrictAboutOutputDuringTests="false"
|
||||
beStrictAboutTodoAnnotatedTests="true"
|
||||
convertDeprecationsToExceptions="true"
|
||||
failOnRisky="true"
|
||||
failOnWarning="true"
|
||||
verbose="true">
|
||||
<testsuites>
|
||||
<testsuite name="docker-example-drupal">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<phpunit
|
||||
beStrictAboutChangesToGlobalState="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
beStrictAboutTestsThatDoNotTestAnything="true"
|
||||
bootstrap="web/core/tests/bootstrap.php"
|
||||
cacheResult="false"
|
||||
colors="true"
|
||||
failOnWarning="true"
|
||||
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter"
|
||||
>
|
||||
<php>
|
||||
<env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/>
|
||||
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
|
||||
<env name="MINK_DRIVER_ARGS" value=''/>
|
||||
<env name="MINK_DRIVER_ARGS_WEBDRIVER" value=''/>
|
||||
<env name="MINK_DRIVER_CLASS" value=''/>
|
||||
<env name="SIMPLETEST_BASE_URL" value="http://web"/>
|
||||
<env name="SIMPLETEST_DB" value="sqlite://localhost//dev/shm/test.sqlite"/>
|
||||
|
||||
<ini name="error_reporting" value="32767"/>
|
||||
<ini name="memory_limit" value="-1"/>
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="functional">
|
||||
<directory>./web/modules/custom/**/tests/**/Functional</directory>
|
||||
</testsuite>
|
||||
<testsuite name="kernel">
|
||||
<directory>./web/modules/custom/**/tests/**/Kernel</directory>
|
||||
</testsuite>
|
||||
<testsuite name="unit">
|
||||
<directory>./web/modules/custom/**/tests/**/Unit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Do not edit this file. It is automatically generated by 'build-configs'.
|
||||
|
||||
[[ -f composer.json && ! -d vendor ]] && composer install
|
||||
|
||||
eval "$@"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Do not edit this file. It is automatically generated by 'build-configs'.
|
||||
|
||||
server {
|
||||
server_name _;
|
||||
|
||||
|
|
Loading…
Reference in a new issue