Skip to content

Commit a111366

Browse files
committed
Migrate to DRUSH_OPTIONS_URI
1 parent 68a573f commit a111366

File tree

7 files changed

+52
-37
lines changed

7 files changed

+52
-37
lines changed

.woodpecker/emnemodul_prod.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ steps:
1919
from_secret: prod_emnemodul_host
2020
path:
2121
from_secret: prod_emnemodul_path
22-
uri:
23-
from_secret: prod_emnemodul_uri
2422
user:
2523
from_secret: user
2624
playbook: 'release'
2725
pre_up:
2826
# Fixes issue with 'Drupal\mysql\Driver\Database\mysql\Connection' not found
2927
- itkdev-docker-compose-server run --rm phpfpm composer2 dump-autoload
30-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes cache:rebuild
31-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes deploy
32-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes locale:update
33-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes locale:import --type=customized --override=none da /app/web/profiles/custom/os2loop/translations/translations.da.po
34-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes cache:rebuild
28+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
29+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy
30+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:update
31+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:import --type=customized --override=none da /app/web/profiles/custom/os2loop/translations/translations.da.po
32+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
3533
cron:
3634
cron:
3735
minute: '08'

.woodpecker/loop_prod.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ steps:
1919
from_secret: prod_loop_host
2020
path:
2121
from_secret: prod_loop_path
22-
uri:
23-
from_secret: prod_loop_uri
2422
user:
2523
from_secret: user
2624
playbook: 'release'
2725
pre_up:
2826
# Fixes issue with 'Drupal\mysql\Driver\Database\mysql\Connection' not found
2927
- itkdev-docker-compose-server run --rm phpfpm composer2 dump-autoload
30-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes cache:rebuild
31-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes deploy
32-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes locale:update
33-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes locale:import --type=customized --override=none da /app/web/profiles/custom/os2loop/translations/translations.da.po
34-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes cache:rebuild
28+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
29+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy
30+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:update
31+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:import --type=customized --override=none da /app/web/profiles/custom/os2loop/translations/translations.da.po
32+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
3533
cron:
3634
cron:
3735
minute: '14'

.woodpecker/risikataloop_prod.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ steps:
1919
from_secret: prod_risikataloop_host
2020
path:
2121
from_secret: prod_risikataloop_path
22-
uri:
23-
from_secret: prod_risikataloop_uri
2422
user:
2523
from_secret: user
2624
playbook: 'release'
2725
pre_up:
2826
# Fixes issue with 'Drupal\mysql\Driver\Database\mysql\Connection' not found
2927
- itkdev-docker-compose-server run --rm phpfpm composer2 dump-autoload
30-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes cache:rebuild
31-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes deploy
32-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes locale:update
33-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes locale:import --type=customized --override=none da /app/web/profiles/custom/os2loop/translations/translations.da.po
34-
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --uri=$${PLUGIN_URI} --yes cache:rebuild
28+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
29+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy
30+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:update
31+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:import --type=customized --override=none da /app/web/profiles/custom/os2loop/translations/translations.da.po
32+
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
3533
cron:
3634
cron:
3735
minute: '23'

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
88

99
## [Unreleased]
1010

11+
## [1.2.3]
12+
13+
- [PR-372](https://github.com/itk-dev/os2loop/pull/372)
14+
Migrate to DRUSH_OPTIONS_URI
15+
1116
## [1.2.2]
1217

1318
- [PR-371](https://github.com/itk-dev/os2loop/pull/371)

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# OS2loop
22

3+
[![Woodpecker](https://img.shields.io/badge/woodpecker-prod|stg-blue.svg?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My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MTc4IDQuNzQ0LTIuODUyIDEuNjMyLjMxNiAzLjI0IDEuNTkzIDMuMTU2IDMuNDJ6bS0yLjg2OC42MmExLjE3NyAxLjE3NyAwIDEwLjczNi0yLjIzNiAxLjE3OCAxLjE3OCAwIDEwLS43MzYgMi4yMzd6Ii8+PC9zdmc+Cg==)](https://woodpecker.itkdev.dk/repos/10)
34
[![Github](https://img.shields.io/badge/source-os2loop/os2loop-blue?style=flat-square)](https://github.com/os2loop/os2loop)
4-
[![Release](https://img.shields.io/github/v/release/os2loop/os2loop?sort=semver&style=flat-square)](https://github.com/os2loop/os2loop/releases)
5-
[![PHP Version](https://img.shields.io/badge/PHP-%5E8.1-9cf)](https://www.php.net/downloads)
6-
[![Build Status](https://img.shields.io/github/workflow/status/itk-dev/os2loop/PR%20Review?&logo=github&style=flat-square)](https://github.com/os2loop/os2loop/actions?query=workflow%3A%22Test+%26+Code+Style+Review%22)
7-
[![Read License](https://img.shields.io/github/license/os2loop/os2loop)](https://github.com/os2loop/os2loop/blob/master/LICENSE.txt)
8-
[![Github downloads](https://img.shields.io/github/downloads/os2loop/os2loop/total?style=flat-square&colorB=darkmagenta)](https://packagist.org/packages/os2loop/os2loop/stats)
5+
[![GitHub Release](https://img.shields.io/github/v/release/itk-dev/os2loop?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tIUZvbnQgQXdlc29tZSBGcmVlIDYuNy4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlL2ZyZWUgQ29weXJpZ2h0IDIwMjUgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgODBMMCAyMjkuNWMwIDE3IDYuNyAzMy4zIDE4LjcgNDUuM2wxNzYgMTc2YzI1IDI1IDY1LjUgMjUgOTAuNSAwTDQxOC43IDMxNy4zYzI1LTI1IDI1LTY1LjUgMC05MC41bC0xNzYtMTc2Yy0xMi0xMi0yOC4zLTE4LjctNDUuMy0xOC43TDQ4IDMyQzIxLjUgMzIgMCA1My41IDAgODB6bTExMiAzMmEzMiAzMiAwIDEgMSAwIDY0IDMyIDMyIDAgMSAxIDAtNjR6Ii8+PC9zdmc+)](https://github.com/itk-dev/os2loop/releases)
6+
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/itk-dev/os2loop/pr.yaml?style=flat-square&logo=github)](https://github.com/itk-dev/os2loop/actions/workflows/pr.yaml)
7+
[![Codecov](https://img.shields.io/codecov/c/github/itk-dev/os2loop?style=flat-square&logo=codecov)](https://codecov.io/gh/itk-dev/os2loop)
8+
[![GitHub last commit](https://img.shields.io/github/last-commit/itk-dev/os2loop?style=flat-square)](https://github.com/itk-dev/os2loop/commits/develop/)
9+
[![GitHub License](https://img.shields.io/github/license/itk-dev/os2loop?style=flat-square)](https://github.com/itk-dev/os2loop/blob/develop/LICENSE)
910

1011
OS2loop is a question-answering system built on Drupal 9. See [os2.eu/produkt/os2loop](https://os2.eu/produkt/os2loop)
1112
(in Danish) for more information.

docker-compose.server.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# itk-version: 3.2.1
1+
# itk-version: 3.2.3
22
networks:
33
frontend:
44
external: true
@@ -17,7 +17,8 @@ services:
1717
environment:
1818
- PHP_MAX_EXECUTION_TIME=30
1919
- PHP_MEMORY_LIMIT=128M
20-
- COMPOSER_VERSION=2
20+
# Let drush know the site uri (makes using --uri redundant)
21+
- DRUSH_OPTIONS_URI=https://${COMPOSE_SERVER_DOMAIN}
2122
depends_on:
2223
- memcached
2324
volumes:

docker-compose.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# itk-version: 3.2.1
1+
# itk-version: 3.2.3
22
networks:
33
frontend:
44
external: true
@@ -13,6 +13,12 @@ services:
1313
- app
1414
ports:
1515
- '3306'
16+
healthcheck:
17+
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
18+
start_period: 10s
19+
interval: 10s
20+
timeout: 5s
21+
retries: 3
1622
environment:
1723
- MYSQL_ROOT_PASSWORD=password
1824
- MYSQL_USER=db
@@ -25,6 +31,7 @@ services:
2531

2632
phpfpm:
2733
image: itkdev/php8.3-fpm:latest
34+
user: ${COMPOSE_USER:-deploy}
2835
networks:
2936
- app
3037
extra_hosts:
@@ -34,13 +41,16 @@ services:
3441
- PHP_MAX_EXECUTION_TIME=30
3542
- PHP_MEMORY_LIMIT=256M
3643
# Depending on the setup, you may have to remove --read-envelope-from from msmtp (cf. https://marlam.de/msmtp/msmtp.html) or use SMTP to send mail
37-
- PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients
44+
- PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients --read-envelope-from
3845
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN}
39-
- COMPOSER_VERSION=2
4046
- PHP_IDE_CONFIG=serverName=localhost
47+
# Let drush know the site uri (makes using --uri redundant)
48+
- DRUSH_OPTIONS_URI=http://${COMPOSE_DOMAIN}
4149
depends_on:
42-
- mariadb
43-
- memcached
50+
mariadb:
51+
condition: service_healthy
52+
memcached:
53+
condition: service_healthy
4454
volumes:
4555
- .:/app
4656

@@ -65,16 +75,20 @@ services:
6575
- "traefik.enable=true"
6676
- "traefik.docker.network=frontend"
6777
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)"
68-
# HTTPS config - uncomment to enable redirect from :80 to :443
69-
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
70-
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
78+
# HTTPS config - uncomment to enable redirect from :80 to :443
79+
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
80+
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
7181

7282
memcached:
73-
image: 'memcached:latest'
83+
image: memcached:alpine
7484
networks:
7585
- app
7686
ports:
7787
- '11211'
88+
healthcheck:
89+
test: echo "version" | nc -vn -w 1 127.0.0.1 11211
90+
interval: 10s
91+
retries: 60
7892
environment:
7993
- MEMCACHED_CACHE_SIZE=64
8094

0 commit comments

Comments
 (0)