Add missing build configuration files
This commit is contained in:
parent
8d1a3b2d91
commit
e526a47389
|
@ -1 +1,2 @@
|
||||||
/README.md
|
/README.md
|
||||||
|
/.github/
|
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
export DOCKER_UID=1000
|
export DOCKER_UID=1000
|
||||||
|
|
||||||
|
export COMPOSE_PROJECT_NAME=atdc
|
||||||
|
export COMPOSE_PROFILES=web,php,database
|
||||||
|
|
||||||
|
export DOCKER_WEB_VOLUME=.:/app
|
||||||
|
|
||||||
|
export DRUSH_OPTIONS_URI="https://${COMPOSE_PROJECT_NAME}.docker.localhost"
|
||||||
|
|
||||||
export MYSQL_DATABASE=app
|
export MYSQL_DATABASE=app
|
||||||
export MYSQL_PASSWORD=app
|
export MYSQL_PASSWORD=app
|
||||||
|
|
9
.githooks/pre-push
Executable file
9
.githooks/pre-push
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
export TTY="-T"
|
||||||
|
|
||||||
|
./run test:commit
|
25
.github/workflows/ci.yml
vendored
Normal file
25
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSE_DOCKER_CLI_BUILD: 1
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_UID: 1001
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
name: Build and test
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout the code
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
|
- name: Build and test
|
||||||
|
run: |
|
||||||
|
./run ci:test
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -36,5 +36,7 @@ web/themes/contrib/
|
||||||
web/update.php
|
web/update.php
|
||||||
web/web.config
|
web/web.config
|
||||||
|
|
||||||
|
# Docker.
|
||||||
|
.env
|
||||||
|
docker-compose.override.yaml
|
||||||
|
|
||||||
.dir-env/
|
|
||||||
|
|
13
Dockerfile
13
Dockerfile
|
@ -1,6 +1,6 @@
|
||||||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||||
|
|
||||||
FROM php: AS base
|
FROM php:8.2-fpm-bullseye AS base
|
||||||
|
|
||||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
RUN which composer && composer -V
|
RUN which composer && composer -V
|
||||||
|
@ -42,6 +42,8 @@ COPY --chown=app:app phpunit.xml* ./
|
||||||
|
|
||||||
USER app
|
USER app
|
||||||
|
|
||||||
|
RUN composer validate --strict
|
||||||
|
RUN composer install
|
||||||
|
|
||||||
COPY --chown=app:app tools/docker/images/php/root /
|
COPY --chown=app:app tools/docker/images/php/root /
|
||||||
|
|
||||||
|
@ -51,3 +53,12 @@ CMD ["php-fpm"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
FROM nginx:1 as web
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY tools/docker/images/web/root /
|
||||||
|
|
|
@ -2,18 +2,43 @@
|
||||||
name: atdc
|
name: atdc
|
||||||
template: drupal
|
template: drupal
|
||||||
parameters:
|
parameters:
|
||||||
flake:
|
web:
|
||||||
devshell:
|
type: nginx
|
||||||
packages:
|
|
||||||
- php82
|
|
||||||
- php82Packages.composer
|
|
||||||
|
|
||||||
git:
|
database:
|
||||||
ignore:
|
type: mariadb
|
||||||
- '!/_lessons/**'
|
version: 10
|
||||||
- '!/phpstan.neon'
|
|
||||||
- '!/tests/**'
|
php:
|
||||||
|
version: 8.2-fpm-bullseye
|
||||||
|
phpcs:
|
||||||
|
paths:
|
||||||
|
- web/modules/custom
|
||||||
|
standards:
|
||||||
|
- Drupal
|
||||||
|
- DrupalPractice
|
||||||
|
phpstan:
|
||||||
|
level: max
|
||||||
|
paths:
|
||||||
|
- web/modules/custom
|
||||||
|
|
||||||
|
drupal:
|
||||||
|
docroot: web
|
||||||
|
|
||||||
|
docker-compose:
|
||||||
|
services:
|
||||||
|
- database
|
||||||
|
- php
|
||||||
|
- web
|
||||||
|
|
||||||
|
dockerfile:
|
||||||
|
stages:
|
||||||
|
build:
|
||||||
|
commands:
|
||||||
|
- composer validate --strict
|
||||||
|
- composer install
|
||||||
|
|
||||||
experimental:
|
experimental:
|
||||||
createTmuxStartupFile: true
|
createGitHubActionsConfiguration: true
|
||||||
createInclusiveGitIgnoreFile: true
|
runGitHooksBeforePush: true
|
||||||
|
useNewDatabaseCredentials: true
|
||||||
|
|
|
@ -30,6 +30,14 @@ x-app: &default-app
|
||||||
tty: true
|
tty: true
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
web:
|
||||||
|
<<: [*default-proxy, *default-app]
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
target: web
|
||||||
|
depends_on:
|
||||||
|
- php
|
||||||
|
profiles: [web]
|
||||||
|
|
||||||
php:
|
php:
|
||||||
<<: [*default-app]
|
<<: [*default-app]
|
||||||
|
@ -40,10 +48,12 @@ services:
|
||||||
- "DOCKER_UID=${DOCKER_UID:-1000}"
|
- "DOCKER_UID=${DOCKER_UID:-1000}"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
profiles: [php]
|
profiles: [php]
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: :
|
image: mariadb:10
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<ruleset name="atdc coding standards">
|
<ruleset name="atdc coding standards">
|
||||||
<description>PHPCS configuration file for atdc.</description>
|
<description>PHPCS configuration file for atdc.</description>
|
||||||
|
|
||||||
|
<file>web/modules/custom</file>
|
||||||
|
|
||||||
<arg value="np"/>
|
<arg value="np"/>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
level:
|
level: max
|
||||||
excludePaths:
|
excludePaths:
|
||||||
- *Test.php
|
- *Test.php
|
||||||
- *TestBase.php
|
- *TestBase.php
|
||||||
paths:
|
paths:
|
||||||
|
- web/modules/custom
|
||||||
|
|
22
tools/docker/images/web/root/etc/nginx/conf.d/default.conf
Normal file
22
tools/docker/images/web/root/etc/nginx/conf.d/default.conf
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /app/web;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php(/|$) {
|
||||||
|
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||||
|
try_files $fastcgi_script_name =404;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param QUERY_STRING $query_string;
|
||||||
|
fastcgi_intercept_errors on;
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue