diff --git a/.github/workflows/yaml.yaml b/.github/workflows/yaml.yaml new file mode 100644 index 0000000..1c0ada3 --- /dev/null +++ b/.github/workflows/yaml.yaml @@ -0,0 +1,40 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/yaml.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### YAML +### +### Validates YAML files. +### +### #### Assumptions +### +### 1. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. +### +### #### Symfony YAML +### +### Symfony's YAML config files use 4 spaces for indentation and single quotes. +### Therefore we use a [Prettier configuration +### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make +### Prettier format YAML files in the `config/` folder like Symfony expects. + +name: YAML + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + yaml-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: | + docker network create frontend + + - run: | + docker compose run --rm prettier '**/*.{yml,yaml}' --check diff --git a/Taskfile.yml b/Taskfile.yml index 50d1028..3ce3dc8 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,6 +1,6 @@ # https://taskfile.dev -version: '3' +version: "3" includes: github-actions: ./task/Taskfile.github-actions.yml @@ -22,6 +22,7 @@ tasks: build: desc: "Build everything" cmds: + - task: github-actions:config-headers:update - task: github-actions:template-headers:update - task: github-actions:documentation:update - task: github-actions:link diff --git a/compose.yaml b/compose.yaml index a2be8aa..d3f6f82 100644 --- a/compose.yaml +++ b/compose.yaml @@ -5,3 +5,14 @@ services: - dev volumes: - ./:/md + + prettier: + # Prettier does not (yet, fcf. + # https://github.com/prettier/prettier/issues/15206) have an official + # docker image. + # https://hub.docker.com/r/jauderho/prettier is good candidate (cf. https://hub.docker.com/search?q=prettier&sort=updated_at&order=desc) + image: jauderho/prettier + profiles: + - dev + volumes: + - ./:/work diff --git a/config/symfony/yaml/.prettierrc.yaml b/config/symfony/yaml/.prettierrc.yaml new file mode 100644 index 0000000..12e0898 --- /dev/null +++ b/config/symfony/yaml/.prettierrc.yaml @@ -0,0 +1,11 @@ +# This file is copied from config/symfony/yaml/.prettierrc.yaml in https://github.com/itk-dev/devops_itkdev-docker. +# Feel free to edit the file, but consider making a pull request if you find a general issue with the file. + +# https://prettier.io/docs/configuration +overrides: + # Symfony config + - files: + - "config/**/*.{yml,yaml}" + options: + tabWidth: 4 + singleQuote: true diff --git a/docs/github-actions-templates.md b/docs/github-actions-templates.md index e83b81f..c462c63 100644 --- a/docs/github-actions-templates.md +++ b/docs/github-actions-templates.md @@ -1,6 +1,6 @@ @@ -299,6 +299,26 @@ Validates Twig files --- +[github/workflows/yaml.yaml](github/workflows/yaml.yaml) + +### YAML + +Validates YAML files. + +#### Assumptions + +1. A docker compose service named `prettier` for running + [Prettier](https://prettier.io/) exists. + +#### Symfony YAML + +Symfony's YAML config files use 4 spaces for indentation and single quotes. +Therefore we use a [Prettier configuration +file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make +Prettier format YAML files in the `config/` folder like Symfony expects. + +--- + ## Updating template documentation To update this document, run diff --git a/github/workflows/yaml.yaml b/github/workflows/yaml.yaml new file mode 100644 index 0000000..1c0ada3 --- /dev/null +++ b/github/workflows/yaml.yaml @@ -0,0 +1,40 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/yaml.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### YAML +### +### Validates YAML files. +### +### #### Assumptions +### +### 1. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. +### +### #### Symfony YAML +### +### Symfony's YAML config files use 4 spaces for indentation and single quotes. +### Therefore we use a [Prettier configuration +### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make +### Prettier format YAML files in the `config/` folder like Symfony expects. + +name: YAML + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + yaml-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: | + docker network create frontend + + - run: | + docker compose run --rm prettier '**/*.{yml,yaml}' --check diff --git a/task/Taskfile.github-actions.yml b/task/Taskfile.github-actions.yml index 1f5df23..f92d3e1 100644 --- a/task/Taskfile.github-actions.yml +++ b/task/Taskfile.github-actions.yml @@ -1,4 +1,4 @@ -version: '3' +version: "3" tasks: documentation:update: @@ -19,7 +19,7 @@ tasks: - git diff --exit-code --ignore-blank-lines --ignore-matching-lines='automatically created' '*.md' documentation:checkout: - desc: 'git checkout all translation file changes if only date metadata is changed' + desc: "git checkout all translation file changes if only date metadata is changed" cmds: - git checkout '*.md' # https://taskfile.dev/reference/schema#precondition diff --git a/templates/drupal-10/.github/workflows/yaml.yaml b/templates/drupal-10/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/drupal-10/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-10/docker-compose.server.yml b/templates/drupal-10/docker-compose.server.yml index 6f984b5..363b08e 100644 --- a/templates/drupal-10/docker-compose.server.yml +++ b/templates/drupal-10/docker-compose.server.yml @@ -52,7 +52,7 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" memcached: - image: 'memcached:latest' + image: "memcached:latest" restart: unless-stopped networks: - app diff --git a/templates/drupal-10/docker-compose.yml b/templates/drupal-10/docker-compose.yml index 130da86..5b35a90 100644 --- a/templates/drupal-10/docker-compose.yml +++ b/templates/drupal-10/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -27,7 +27,7 @@ services: #- ENCRYPT=1 # Uncomment to enable database encryption. # https://symfony.com/doc/current/setup/symfony_server.html#docker-integration labels: - com.symfony.server.service-prefix: 'DATABASE' + com.symfony.server.service-prefix: "DATABASE" phpfpm: image: itkdev/php8.3-fpm:latest @@ -62,7 +62,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -75,16 +75,16 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" memcached: image: memcached:alpine networks: - app ports: - - '11211' + - "11211" healthcheck: test: echo "version" | nc -vn -w 1 127.0.0.1 11211 interval: 10s diff --git a/templates/drupal-11/.github/workflows/yaml.yaml b/templates/drupal-11/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/drupal-11/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-11/docker-compose.server.yml b/templates/drupal-11/docker-compose.server.yml index e4306ba..96d401b 100644 --- a/templates/drupal-11/docker-compose.server.yml +++ b/templates/drupal-11/docker-compose.server.yml @@ -52,7 +52,7 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" memcached: - image: 'memcached:latest' + image: "memcached:latest" restart: unless-stopped networks: - app diff --git a/templates/drupal-11/docker-compose.yml b/templates/drupal-11/docker-compose.yml index 3f1aa26..826b71e 100644 --- a/templates/drupal-11/docker-compose.yml +++ b/templates/drupal-11/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -59,7 +59,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -81,7 +81,7 @@ services: networks: - app ports: - - '11211' + - "11211" healthcheck: test: echo "version" | nc -vn -w 1 127.0.0.1 11211 interval: 10s diff --git a/templates/drupal-7/.github/workflows/yaml.yaml b/templates/drupal-7/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/drupal-7/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-7/docker-compose.server.yml b/templates/drupal-7/docker-compose.server.yml index 2ffbf54..023a758 100644 --- a/templates/drupal-7/docker-compose.server.yml +++ b/templates/drupal-7/docker-compose.server.yml @@ -51,7 +51,7 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" memcached: - image: 'memcached:latest' + image: "memcached:latest" restart: unless-stopped networks: - app diff --git a/templates/drupal-7/docker-compose.yml b/templates/drupal-7/docker-compose.yml index e79bb13..628cc8c 100644 --- a/templates/drupal-7/docker-compose.yml +++ b/templates/drupal-7/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -27,7 +27,7 @@ services: #- ENCRYPT=1 # Uncomment to enable database encryption. # https://symfony.com/doc/current/setup/symfony_server.html#docker-integration labels: - com.symfony.server.service-prefix: 'DATABASE' + com.symfony.server.service-prefix: "DATABASE" phpfpm: image: itkdev/php7.4-fpm:latest @@ -61,7 +61,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -74,16 +74,16 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" memcached: - image: 'memcached:latest' + image: "memcached:latest" networks: - app ports: - - '11211' + - "11211" healthcheck: test: echo "version" | nc -vn -w 1 127.0.0.1 11211 interval: 10s diff --git a/templates/drupal-8/.github/workflows/yaml.yaml b/templates/drupal-8/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/drupal-8/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-8/docker-compose.server.yml b/templates/drupal-8/docker-compose.server.yml index d5a39d2..4114feb 100644 --- a/templates/drupal-8/docker-compose.server.yml +++ b/templates/drupal-8/docker-compose.server.yml @@ -50,7 +50,7 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" memcached: - image: 'memcached:latest' + image: "memcached:latest" restart: unless-stopped networks: - app diff --git a/templates/drupal-8/docker-compose.yml b/templates/drupal-8/docker-compose.yml index da6b4b0..e1fac7f 100644 --- a/templates/drupal-8/docker-compose.yml +++ b/templates/drupal-8/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -27,7 +27,7 @@ services: #- ENCRYPT=1 # Uncomment to enable database encryption. # https://symfony.com/doc/current/setup/symfony_server.html#docker-integration labels: - com.symfony.server.service-prefix: 'DATABASE' + com.symfony.server.service-prefix: "DATABASE" phpfpm: image: itkdev/php8.0-fpm:latest @@ -60,7 +60,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -73,16 +73,16 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" memcached: - image: 'memcached:latest' + image: "memcached:latest" networks: - app ports: - - '11211' + - "11211" healthcheck: test: echo "version" | nc -vn -w 1 127.0.0.1 11211 interval: 10s diff --git a/templates/drupal-9/.github/workflows/yaml.yaml b/templates/drupal-9/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/drupal-9/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/drupal-9/docker-compose.server.yml b/templates/drupal-9/docker-compose.server.yml index 50770aa..6dc4546 100644 --- a/templates/drupal-9/docker-compose.server.yml +++ b/templates/drupal-9/docker-compose.server.yml @@ -52,7 +52,7 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" memcached: - image: 'memcached:latest' + image: "memcached:latest" restart: unless-stopped networks: - app diff --git a/templates/drupal-9/docker-compose.yml b/templates/drupal-9/docker-compose.yml index 839a0b8..f9401db 100644 --- a/templates/drupal-9/docker-compose.yml +++ b/templates/drupal-9/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -27,7 +27,7 @@ services: #- ENCRYPT=1 # Uncomment to enable database encryption. # https://symfony.com/doc/current/setup/symfony_server.html#docker-integration labels: - com.symfony.server.service-prefix: 'DATABASE' + com.symfony.server.service-prefix: "DATABASE" phpfpm: image: itkdev/php8.3-fpm:latest @@ -62,7 +62,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -75,16 +75,16 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" memcached: - image: 'memcached:latest' + image: "memcached:latest" networks: - app ports: - - '11211' + - "11211" healthcheck: test: echo "version" | nc -vn -w 1 127.0.0.1 11211 interval: 10s diff --git a/templates/drupal-module/.github/workflows/yaml.yaml b/templates/drupal-module/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/drupal-module/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony-3/.github/workflows/yaml.yaml b/templates/symfony-3/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/symfony-3/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony-3/.prettierrc.yaml b/templates/symfony-3/.prettierrc.yaml new file mode 120000 index 0000000..eeef7b8 --- /dev/null +++ b/templates/symfony-3/.prettierrc.yaml @@ -0,0 +1 @@ +../../config/symfony/yaml/.prettierrc.yaml \ No newline at end of file diff --git a/templates/symfony-3/docker-compose.server.yml b/templates/symfony-3/docker-compose.server.yml index 94f7368..cfe2c11 100644 --- a/templates/symfony-3/docker-compose.server.yml +++ b/templates/symfony-3/docker-compose.server.yml @@ -46,4 +46,3 @@ services: - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" - diff --git a/templates/symfony-3/docker-compose.yml b/templates/symfony-3/docker-compose.yml index e986e84..04a5ae6 100644 --- a/templates/symfony-3/docker-compose.yml +++ b/templates/symfony-3/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -27,7 +27,7 @@ services: #- ENCRYPT=1 # Uncomment to enable database encryption. # https://symfony.com/doc/current/setup/symfony_server.html#docker-integration labels: - com.symfony.server.service-prefix: 'DATABASE' + com.symfony.server.service-prefix: "DATABASE" phpfpm: image: itkdev/php7.2-fpm:latest @@ -46,7 +46,7 @@ services: - PHP_IDE_CONFIG=serverName=localhost depends_on: mariadb: - condition: service_healthy + condition: service_healthy volumes: - .:/app @@ -58,7 +58,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -71,9 +71,9 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" mail: image: axllent/mailpit diff --git a/templates/symfony-4/.github/workflows/yaml.yaml b/templates/symfony-4/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/symfony-4/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony-4/.prettierrc.yaml b/templates/symfony-4/.prettierrc.yaml new file mode 120000 index 0000000..eeef7b8 --- /dev/null +++ b/templates/symfony-4/.prettierrc.yaml @@ -0,0 +1 @@ +../../config/symfony/yaml/.prettierrc.yaml \ No newline at end of file diff --git a/templates/symfony-4/docker-compose.yml b/templates/symfony-4/docker-compose.yml index d6af960..c364564 100644 --- a/templates/symfony-4/docker-compose.yml +++ b/templates/symfony-4/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -27,7 +27,7 @@ services: #- ENCRYPT=1 # Uncomment to enable database encryption. # https://symfony.com/doc/current/setup/symfony_server.html#docker-integration labels: - com.symfony.server.service-prefix: 'DATABASE' + com.symfony.server.service-prefix: "DATABASE" phpfpm: image: itkdev/php7.4-fpm:latest @@ -46,7 +46,7 @@ services: - PHP_IDE_CONFIG=serverName=localhost depends_on: mariadb: - condition: service_healthy + condition: service_healthy volumes: - .:/app @@ -58,7 +58,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -71,9 +71,9 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" mail: image: axllent/mailpit diff --git a/templates/symfony-6/.github/workflows/yaml.yaml b/templates/symfony-6/.github/workflows/yaml.yaml new file mode 120000 index 0000000..725a7d6 --- /dev/null +++ b/templates/symfony-6/.github/workflows/yaml.yaml @@ -0,0 +1 @@ +../../../../github/workflows/yaml.yaml \ No newline at end of file diff --git a/templates/symfony-6/.prettierrc.yaml b/templates/symfony-6/.prettierrc.yaml new file mode 120000 index 0000000..eeef7b8 --- /dev/null +++ b/templates/symfony-6/.prettierrc.yaml @@ -0,0 +1 @@ +../../config/symfony/yaml/.prettierrc.yaml \ No newline at end of file diff --git a/templates/symfony-6/docker-compose.yml b/templates/symfony-6/docker-compose.yml index 6edca92..b5c0894 100644 --- a/templates/symfony-6/docker-compose.yml +++ b/templates/symfony-6/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -55,7 +55,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -68,9 +68,9 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" mail: image: axllent/mailpit diff --git a/traefik/dynamic-conf.yaml b/traefik/dynamic-conf.yaml index c521432..e87c11c 100644 --- a/traefik/dynamic-conf.yaml +++ b/traefik/dynamic-conf.yaml @@ -3,7 +3,7 @@ http: ITKMetricsAuth: basicAuth: users: - - 'metrics:$apr1$NN0pEsue$o.K99fyHjlf8XpOh1NA8Y.' + - "metrics:$apr1$NN0pEsue$o.K99fyHjlf8XpOh1NA8Y." tls: certificates: diff --git a/traefik/traefik.yml b/traefik/traefik.yml index 2b7fa5d..2840741 100644 --- a/traefik/traefik.yml +++ b/traefik/traefik.yml @@ -1,4 +1,3 @@ - api: dashboard: true insecure: true @@ -10,8 +9,7 @@ entryPoints: https: address: ":443" http: - tls: - {} + tls: {} providers: file: