Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .woodpecker/emnemodul_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
when:
- event: release

skip_clone: true

labels:
zone: DMZ

steps:
- name: Ansible playbook
image: itkdev/ansible-plugin:1
pull: true
settings:
id:
from_secret: id
secret:
from_secret: secret
host:
from_secret: prod_emnemodul_host
path:
from_secret: prod_emnemodul_path
user:
from_secret: user
playbook: 'release'
pre_up:
# Fixes issue with 'Drupal\mysql\Driver\Database\mysql\Connection' not found
- itkdev-docker-compose-server run --rm phpfpm composer2 dump-autoload
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:update
- 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
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
cron:
cron:
minute: '08'
hour: '*'
day: '*'
month: '*'
weekday: '*'
job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush core:cron'
40 changes: 40 additions & 0 deletions .woodpecker/loop_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
when:
- event: release

skip_clone: true

labels:
zone: DMZ

steps:
- name: Ansible playbook
image: itkdev/ansible-plugin:1
pull: true
settings:
id:
from_secret: id
secret:
from_secret: secret
host:
from_secret: prod_loop_host
path:
from_secret: prod_loop_path
user:
from_secret: user
playbook: 'release'
pre_up:
# Fixes issue with 'Drupal\mysql\Driver\Database\mysql\Connection' not found
- itkdev-docker-compose-server run --rm phpfpm composer2 dump-autoload
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:update
- 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
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
cron:
cron:
minute: '14'
hour: '*'
day: '*'
month: '*'
weekday: '*'
job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush core:cron'
40 changes: 40 additions & 0 deletions .woodpecker/risikataloop_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
when:
- event: release

skip_clone: true

labels:
zone: DMZ

steps:
- name: Ansible playbook
image: itkdev/ansible-plugin:1
pull: true
settings:
id:
from_secret: id
secret:
from_secret: secret
host:
from_secret: prod_risikataloop_host
path:
from_secret: prod_risikataloop_path
user:
from_secret: user
playbook: 'release'
pre_up:
# Fixes issue with 'Drupal\mysql\Driver\Database\mysql\Connection' not found
- itkdev-docker-compose-server run --rm phpfpm composer2 dump-autoload
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes locale:update
- 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
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild
cron:
cron:
minute: '23'
hour: '*'
day: '*'
month: '*'
weekday: '*'
job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush core:cron'
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.2.3]

- [PR-372](https://github.com/itk-dev/os2loop/pull/372)
Migrate to DRUSH_OPTIONS_URI

## [1.2.2]

- [PR-371](https://github.com/itk-dev/os2loop/pull/371)
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# OS2loop

[![Woodpecker](https://img.shields.io/badge/woodpecker-prod|stg-blue.svg?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTEuMjYzIDIuNzQ0QzIuNDEgMy44MzIgMi44NDUgNC45MzIgNC4xMTggNS4wOGwuMDM2LjAwN2MtLjU4OC42MDYtMS4wOSAxLjQwMi0xLjQ0MyAyLjQyMy0uMzggMS4wOTYtLjQ4OCAyLjI4NS0uNjE0IDMuNjU5LS4xOSAyLjA0Ni0uNDAxIDQuMzY0LTEuNTU2IDcuMjY5LTIuNDg2IDYuMjU4LTEuMTIgMTEuNjMuMzMyIDE3LjMxNy42NjQgMi42MDQgMS4zNDggNS4yOTcgMS42NDIgOC4xMDdhLjg1Ny44NTcgMCAwMC42MzMuNzQ0Ljg2Ljg2IDAgMDAuOTIyLS4zMjNjLjIyNy0uMzEzLjUyNC0uNzk3Ljg2LTEuNDI0Ljg0IDMuMzIzIDEuMzU1IDYuMTMgMS43ODMgOC42OTdhLjg2Ni44NjYgMCAwMDEuNTE3LjQxYzIuODgtMy40NjMgMy43NjMtOC42MzYgMi4xODQtMTIuNjc0LjQ1OS0yLjQzMyAxLjQwMi00LjQ1IDIuMzk4LTYuNTgzLjUzNi0xLjE1IDEuMDgtMi4zMTggMS41NS0zLjU2Ni4yMjgtLjA4NC41NjktLjMxNC43OS0uNDQxbDEuNzA3LS45ODEtLjI1NiAxLjA1MmEuODY0Ljg2NCAwIDAwMS42NzguNDA4bC42OC0yLjg1OCAxLjI4NS0yLjk1YS44NjMuODYzIDAgMTAtM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1IDE2Ljc4MmwtLjExNi4yNTktLjQ1Ny45ODJjLS4zNTYtMi4wMTQtLjg1LTMuOTUtMS4zMy01Ljg0LTEuMzgtNS40MDYtMi42OC0xMC41MTUtLjQwMS0xNi4yNTQgMS4yNDctMy4xMzcgMS40ODMtNS42OTIgMS42NzItNy43NDYuMTE2LTEuMjYzLjIxNi0yLjM1NS41MjYtMy4yNTIuOTA1LTIuNjA1IDMuMDYyLTMuMTc4IDQuNzQ0LTIuODUyIDEuNjMyLjMxNiAzLjI0IDEuNTkzIDMuMTU2IDMuNDJ6bS0yLjg2OC42MmExLjE3NyAxLjE3NyAwIDEwLjczNi0yLjIzNiAxLjE3OCAxLjE3OCAwIDEwLS43MzYgMi4yMzd6Ii8+PC9zdmc+Cg==)](https://woodpecker.itkdev.dk/repos/10)
[![Github](https://img.shields.io/badge/source-os2loop/os2loop-blue?style=flat-square)](https://github.com/os2loop/os2loop)
[![Release](https://img.shields.io/github/v/release/os2loop/os2loop?sort=semver&style=flat-square)](https://github.com/os2loop/os2loop/releases)
[![PHP Version](https://img.shields.io/badge/PHP-%5E8.1-9cf)](https://www.php.net/downloads)
[![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)
[![Read License](https://img.shields.io/github/license/os2loop/os2loop)](https://github.com/os2loop/os2loop/blob/master/LICENSE.txt)
[![Github downloads](https://img.shields.io/github/downloads/os2loop/os2loop/total?style=flat-square&colorB=darkmagenta)](https://packagist.org/packages/os2loop/os2loop/stats)
[![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)
[![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)
[![Codecov](https://img.shields.io/codecov/c/github/itk-dev/os2loop?style=flat-square&logo=codecov)](https://codecov.io/gh/itk-dev/os2loop)
[![GitHub last commit](https://img.shields.io/github/last-commit/itk-dev/os2loop?style=flat-square)](https://github.com/itk-dev/os2loop/commits/develop/)
[![GitHub License](https://img.shields.io/github/license/itk-dev/os2loop?style=flat-square)](https://github.com/itk-dev/os2loop/blob/develop/LICENSE)

OS2loop is a question-answering system built on Drupal 9. See [os2.eu/produkt/os2loop](https://os2.eu/produkt/os2loop)
(in Danish) for more information.
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.server.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# itk-version: 3.2.1
# itk-version: 3.2.3
networks:
frontend:
external: true
Expand All @@ -17,7 +17,8 @@ services:
environment:
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=128M
- COMPOSER_VERSION=2
# Let drush know the site uri (makes using --uri redundant)
- DRUSH_OPTIONS_URI=https://${COMPOSE_SERVER_DOMAIN}
depends_on:
- memcached
volumes:
Expand Down
32 changes: 23 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# itk-version: 3.2.1
# itk-version: 3.2.3
networks:
frontend:
external: true
Expand All @@ -13,6 +13,12 @@ services:
- app
ports:
- '3306'
healthcheck:
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=db
Expand All @@ -25,6 +31,7 @@ services:

phpfpm:
image: itkdev/php8.3-fpm:latest
user: ${COMPOSE_USER:-deploy}
networks:
- app
extra_hosts:
Expand All @@ -34,13 +41,16 @@ services:
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=256M
# 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
- PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients
- PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients --read-envelope-from
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN}
- COMPOSER_VERSION=2
- PHP_IDE_CONFIG=serverName=localhost
# Let drush know the site uri (makes using --uri redundant)
- DRUSH_OPTIONS_URI=http://${COMPOSE_DOMAIN}
depends_on:
- mariadb
- memcached
mariadb:
condition: service_healthy
memcached:
condition: service_healthy
volumes:
- .:/app

Expand All @@ -65,16 +75,20 @@ 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:alpine
networks:
- app
ports:
- '11211'
healthcheck:
test: echo "version" | nc -vn -w 1 127.0.0.1 11211
interval: 10s
retries: 60
environment:
- MEMCACHED_CACHE_SIZE=64

Expand Down
Loading