Skip to content

Commit

Permalink
publish 'wordpress' harness
Browse files Browse the repository at this point in the history
  • Loading branch information
andytson-inviqa committed Jun 24, 2022
1 parent 907701a commit 3d2e5d6
Show file tree
Hide file tree
Showing 183 changed files with 6,894 additions and 0 deletions.
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2020, Inviqa

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
12 changes: 12 additions & 0 deletions _twig/docker-compose.yml/service/blackfire.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
blackfire:
image: {{ @('services.blackfire.image') }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
environment: {{ to_nice_yaml(deep_merge([
@('services.blackfire.environment'),
@('services.blackfire.environment_dynamic'),
@('services.blackfire.environment_secrets')
]), 2, 6) | raw }}
networks:
- private
12 changes: 12 additions & 0 deletions _twig/docker-compose.yml/service/chrome.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
chrome:
{% if host_architecture() == 'amd64' %}
image: yukinying/chrome-headless-browser:latest
command: ["--no-sandbox", "--disable-gpu", "--headless", "--disable-dev-shm-usage", "--remote-debugging-address=0.0.0.0", "--remote-debugging-port=9222", "--user-data-dir=/data"]
{% else %}
image: quay.io/inviqa_images/chromium:latest
{% endif %}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
networks:
- private
33 changes: 33 additions & 0 deletions _twig/docker-compose.yml/service/console.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% set syncvolume = false %}
{% if @('host.os') == 'darwin' and bool(@('mutagen')) %}
{% set syncvolume = true %}
{% endif %}

console:
build:
context: ./
dockerfile: .my127ws/docker/image/console/Dockerfile
{% if @('app.build') == 'dynamic' %}
entrypoint: [/entrypoint.dynamic.sh]
command: [sleep, infinity]
volumes:
- {{ (syncvolume) ? @('workspace.name') ~ '-sync:/app:nocopy' : ('./:/app' ~ @('docker.compose.host_volume_options')) }}
- ./.my127ws/application:/home/build/application
- ./.my127ws/docker/image/console/root/lib/task:/lib/task
- ./.my127ws:/.my127ws
{% else %}
image: {{ @('services.console.image') }}
{% endif %}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
environment: {{ to_nice_yaml(deep_merge([
@('services.php-base.environment'),
@('services.php-base.environment_dynamic'),
@('services.console.environment'),
@('services.console.environment_dynamic'),
@('services.php-base.environment_secrets'),
@('services.console.environment_secrets')
]), 2, 6) | raw }}
networks:
- private
24 changes: 24 additions & 0 deletions _twig/docker-compose.yml/service/cron.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
cron:
build:
context: ./
dockerfile: .my127ws/docker/image/cron/Dockerfile
{% if @('app.build') == 'dynamic' %}
volumes:
- {{ (syncvolume) ? @('workspace.name') ~ '-sync:/app:nocopy' : ('./:/app' ~ @('docker.compose.host_volume_options')) }}
- ./.my127ws/application:/home/build/application
{% else %}
image: {{ @('services.cron.image') }}
{% endif %}
environment: {{ to_nice_yaml(deep_merge([
@('services.php-base.environment'),
@('services.php-base.environment_dynamic'),
@('services.cron.environment'),
@('services.cron.environment_dynamic'),
@('services.php-base.environment_secrets'),
@('services.cron.environment_secrets')
]), 2, 6) | raw }}
networks:
- private
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
15 changes: 15 additions & 0 deletions _twig/docker-compose.yml/service/elasticsearch.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
elasticsearch:
image: {{ @('services.elasticsearch.image') }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
environment:
ES_JAVA_OPTS: -Xms512m -Xmx512m
discovery.type: single-node
networks:
- private
{% if @('app.build') != 'static' and @('docker.port_forward.enabled') %}
ports:
- "127.0.0.1:0:9200"
- "127.0.0.1:0:9300"
{% endif %}
13 changes: 13 additions & 0 deletions _twig/docker-compose.yml/service/lighthouse.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
lighthouse:
build: .my127ws/docker/image/lighthouse
entrypoint: "/usr/bin/dumb-init --"
command: "/bin/true"
environment:
TARGET_URL: "{{ @('lighthouse.target.url') | raw }}"
OUTPUT_RESULTS: "${OUTPUT_RESULTS:-}"
{% if @('app.build') == 'dynamic' %}
volumes:
- .my127ws/docker/image/lighthouse/root/app:/app
{% endif %}
networks:
- private
7 changes: 7 additions & 0 deletions _twig/docker-compose.yml/service/memcached.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
memcached:
image: {{ @('services.memcached.image') }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
networks:
- private
16 changes: 16 additions & 0 deletions _twig/docker-compose.yml/service/mongodb.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mongodb:
image: {{ @('services.mongodb.image') }}
environment: {{ to_nice_yaml(deep_merge([
@('services.mongodb.environment'),
@('services.mongodb.environment_dynamic'),
@('services.mongodb.environment_secrets')
]), 2, 6) | raw }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
networks:
- private
expose:
- 27017
volumes:
- /data/db
21 changes: 21 additions & 0 deletions _twig/docker-compose.yml/service/mysql.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% set command = @('services.mysql.options')
| filter(v => v is not empty)
| map((value, var) => '--' ~ var ~ '=' ~ value)
| reduce((carry, v) => carry|merge([v]), []) %}
mysql:
image: {{ @('services.mysql.image') }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
command: {{ to_nice_yaml(command, 2, 6) }}
environment: {{ to_nice_yaml(deep_merge([
@('services.mysql.environment'),
@('services.mysql.environment_dynamic'),
@('services.mysql.environment_secrets')
]), 2, 6) | raw }}
networks:
- private
{% if @('app.build') != 'static' and @('docker.port_forward.enabled') %}
ports:
- "127.0.0.1:{{ @('database.port_forward') ? @('database.port_forward') : '0' }}:3306"
{% endif %}
49 changes: 49 additions & 0 deletions _twig/docker-compose.yml/service/nginx.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% set syncvolume = false %}
{% if @('host.os') == 'darwin' and bool(@('mutagen')) %}
{% set syncvolume = true %}
{% endif %}
{% set hostnames = [@('hostname')] %}
{% set hostnames = hostnames|merge(@('hostname_aliases')|map(alias => "#{alias}." ~ @('domain'))) %}
{% set traefikRules = hostnames|map(hostname => "Host(`" ~ hostname ~ "`)") %}
nginx:
build: .my127ws/docker/image/nginx
{% if @('app.build') == 'dynamic' %}
volumes:
- {{ (syncvolume) ? @('workspace.name') ~ '-sync:/app:nocopy' : ('./:/app' ~ @('docker.compose.host_volume_options')) }}
{% else %}
image: {{ @('services.nginx.image') }}
{% endif %}
labels:
{% if @('services.varnish.enabled') %}
# deprecated, a later workspace release will disable by default
- traefik.enable=false
{% else %}
# Traefik 1, deprecated
- traefik.backend={{ @('workspace.name') }}
- traefik.frontend.rule=Host:{{ hostnames|join(',') }}
- traefik.docker.network=my127ws
- traefik.port=80
# Traefik 2
- traefik.enable=true
# - traefik.docker.network=my127ws
- traefik.http.routers.{{ @('workspace.name') }}-nginx.rule={{ traefikRules | join(' || ') }}
- traefik.http.services.{{ @('workspace.name') }}-nginx.loadbalancer.server.port=80
{% endif %}
environment: {{ to_nice_yaml(deep_merge([
@('services.nginx.environment'),
@('services.nginx.environment_dynamic'),
@('services.nginx.environment_secrets')
]), 2, 6) | raw }}
links:
- php-fpm:php-fpm
networks:
{% if @('services.varnish.enabled') %}
private: {}
{% else %}
private:
aliases:
{% for alias in hostnames %}
- {{ alias }}
{% endfor %}
{% endif %}
shared: {}
14 changes: 14 additions & 0 deletions _twig/docker-compose.yml/service/php-fpm-exporter.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
php-fpm-exporter:
image: {{ @('services.php-fpm-exporter.image') }}
environment: {{ to_nice_yaml(deep_merge([
@('services.php-fpm-exporter.environment'),
@('services.php-fpm-exporter.environment_dynamic'),
@('services.php-fpm-exporter.environment_secrets')
]), 2, 6) | raw }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
depends_on:
- php-fpm
networks:
- private
34 changes: 34 additions & 0 deletions _twig/docker-compose.yml/service/php-fpm.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% set syncvolume = false %}
{% if @('host.os') == 'darwin' and bool(@('mutagen')) %}
{% set syncvolume = true %}
{% endif %}

php-fpm:
build: .my127ws/docker/image/php-fpm
{% if @('app.build') == 'dynamic' %}
{% if @('services.cron.enabled') %}
image: {{ @('workspace.name') ~ '-php-fpm:dev' }}
{% endif %}
volumes:
- {{ (syncvolume) ? @('workspace.name') ~ '-sync:/app:nocopy' : ('./:/app' ~ @('docker.compose.host_volume_options')) }}
- ./.my127ws:/.my127ws
{% else %}
image: {{ @('services.php-fpm.image') }}
{% endif %}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
networks:
- private
environment: {{ to_nice_yaml(deep_merge([
@('services.php-base.environment'),
@('services.php-base.environment_dynamic'),
@('services.php-fpm.environment'),
@('services.php-fpm.environment_dynamic'),
@('services.php-base.environment_secrets'),
@('services.php-fpm.environment_secrets')
]), 2, 6) | raw }}
expose:
{% for pool in @('php-fpm.pools') %}
- {{ pool.port }}
{% endfor %}
16 changes: 16 additions & 0 deletions _twig/docker-compose.yml/service/postgres.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
postgres:
image: {{ @('services.postgres.image') }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
environment: {{ to_nice_yaml(deep_merge([
@('services.postgres.environment'),
@('services.postgres.environment_dynamic'),
@('services.postgres.environment_secrets')
]), 2, 6) | raw }}
networks:
- private
{% if @('app.build') != 'static' and @('docker.port_forward.enabled') %}
ports:
- "127.0.0.1:{{ @('database.port_forward') ? @('database.port_forward') : '0' }}:5432"
{% endif %}
17 changes: 17 additions & 0 deletions _twig/docker-compose.yml/service/rabbitmq.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
rabbitmq:
image: {{ @('services.rabbitmq.image') }}
environment: {{ to_nice_yaml(deep_merge([
@('services.rabbitmq.environment'),
@('services.rabbitmq.environment_dynamic'),
@('services.rabbitmq.environment_secrets')
]), 2, 6) | raw }}
networks:
- private
- shared
labels:
- traefik.backend={{ @('rabbitmq.host') }}-{{ @('workspace.name') }}
- traefik.frontend.rule=Host:{{ @('rabbitmq.external_host') }}
- traefik.docker.network=my127ws
- traefik.port={{ @('rabbitmq.api_port') }}
- co.elastic.logs/module=rabbitmq
- co.elastic.metrics/module=rabbitmq
9 changes: 9 additions & 0 deletions _twig/docker-compose.yml/service/redis-session.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
redis-session:
image: {{ @('services.redis-session.image') }}
# 1GB; evict key that would expire soonest
command: redis-server --maxmemory 1073742000 --maxmemory-policy volatile-ttl --save 3600 1 --save 300 100 --save 60 10000
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
networks:
- private
9 changes: 9 additions & 0 deletions _twig/docker-compose.yml/service/redis.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
redis:
image: {{ @('services.redis.image') }}
# 1GB; evict any least recently used key even if they don't have a TTL
command: redis-server --maxmemory 1073742000 --maxmemory-policy allkeys-lru --save 3600 1 --save 300 100 --save 60 10000
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
networks:
- private
11 changes: 11 additions & 0 deletions _twig/docker-compose.yml/service/relay.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
relay:
build: .my127ws/docker/image/relay
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
networks:
private:
aliases:
- jaeger-relay
- mailhog-relay
shared: {}
22 changes: 22 additions & 0 deletions _twig/docker-compose.yml/service/solr.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
solr:
build:
context: .
dockerfile: .my127ws/docker/image/solr/Dockerfile
{% if @('app.build') == 'static' %}
image: {{ @('services.solr.image') }}
{% endif %}
environment: {{ to_nice_yaml(deep_merge([
@('services.solr.environment'),
@('services.solr.environment_dynamic'),
@('services.solr.environment_secrets')
]), 2, 6) | raw }}
labels:
- traefik.backend=solr-{{ @('workspace.name') }}
- traefik.frontend.rule=Host:solr-{{ @('hostname') }}
- traefik.docker.network=my127ws
- traefik.port=8983
volumes:
- solr_data:{{ @('services.solr.environment.SOLR_VOLUME_DIR') }}
networks:
- private
- shared
12 changes: 12 additions & 0 deletions _twig/docker-compose.yml/service/tideways.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tideways:
image: {{ @('services.tideways.image') }}
labels:
# deprecated, a later workspace release will disable by default
- traefik.enable=false
environment: {{ to_nice_yaml(deep_merge([
@('services.tideways.environment'),
@('services.tideways.environment_dynamic'),
@('services.tideways.environment_secrets')
]), 2, 6) | raw }}
networks:
- private
Loading

0 comments on commit 3d2e5d6

Please sign in to comment.