diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg new file mode 100755 index 0000000..6ff8ea0 --- /dev/null +++ b/.githooks/prepare-commit-msg @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs. + +# Load the issue ID from an `.issue-id` file within the project and replace the +# `ISSUE_ID` placeholder within a Git commit message. +# +# For example, running `echo "OD-123" > .issue-id` will add `Refs: OD-123` to +# the commit message. +# +# This also works with multiple issue IDs in the same string, e.g. +# "OD-123 OD-456", or IDs on multiple lines. + +set -o errexit +set -o nounset +set -o pipefail + +PROJECT_DIR=$(git rev-parse --show-toplevel) +ISSUE_FILE="$PROJECT_DIR/.issue-id" + +if [ -f "${ISSUE_FILE}" ]; then + ISSUE_IDS=$(cat "${ISSUE_FILE}" | tr '\n' ',' | tr ' ' ',' | sed 's/,$//' | sed 's/,/, /g') + + if [ -n "${ISSUE_IDS}" ]; then + sed -i.bak "s/# Refs:/Refs: $ISSUE_IDS/" "$1" + fi +fi diff --git a/.gitignore b/.gitignore index 22ce253..01d9ebb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .editorconfig .env .gitattributes +.phpunit.result.cache vendor/ web/.csslintrc web/.eslintignore @@ -39,7 +40,3 @@ web/web.config .env docker-compose.override.yaml - -!/phpstan.neon -!/tests/Architecture/** - diff --git a/docker-compose.yaml b/docker-compose.yaml index d6ba068..1177655 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,12 +3,14 @@ x-proxy: &default-proxy networks: - default - - web + - proxy labels: + - "traefik.enable=true" - "traefik.docker.network=traefik_proxy" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host( - `${COMPOSE_PROJECT_NAME}.localhost`, + `${COMPOSE_PROJECT_NAME}.docker.localhost`, )" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true" x-app: &default-app volumes: @@ -24,7 +26,7 @@ x-app: &default-app cpus: "${DOCKER_MYSQL_CPUS:-0}" memory: "${DOCKER_MYSQL_MEMORY:-0}" labels: - - "traefik.enabled=false" + - "traefik.enable=false" tty: true services: @@ -55,7 +57,7 @@ services: env_file: - .env labels: - - "traefik.enabled=false" + - "traefik.enable=false" environment: MYSQL_RANDOM_ROOT_PASSWORD: true profiles: [database] @@ -64,6 +66,6 @@ volumes: db-data: {} networks: - web: + proxy: external: true name: traefik_proxy