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 Dec 16, 2021
1 parent 415d703 commit caf47f8
Show file tree
Hide file tree
Showing 177 changed files with 6,475 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.
11 changes: 11 additions & 0 deletions _twig/docker-compose.yml/service/blackfire.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blackfire:
image: {{ @('services.blackfire.image') }}
labels:
- 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
11 changes: 11 additions & 0 deletions _twig/docker-compose.yml/service/chrome.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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:
- traefik.enable=false
networks:
- private
32 changes: 32 additions & 0 deletions _twig/docker-compose.yml/service/console.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{% 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:
- 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
23 changes: 23 additions & 0 deletions _twig/docker-compose.yml/service/cron.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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:
- traefik.enable=false
14 changes: 14 additions & 0 deletions _twig/docker-compose.yml/service/elasticsearch.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
elasticsearch:
image: {{ @('services.elasticsearch.image') }}
labels:
- 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 %}
12 changes: 12 additions & 0 deletions _twig/docker-compose.yml/service/lighthouse.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
lighthouse:
build: .my127ws/docker/image/lighthouse
entrypoint: "/usr/bin/dumb-init --"
command: "/bin/true"
environment:
TARGET_URL: "{{ @('lighthouse.target.url') | raw }}"
{% if @('app.build') == 'dynamic' %}
volumes:
- .my127ws/docker/image/lighthouse/root/app:/app
{% endif %}
networks:
- private
6 changes: 6 additions & 0 deletions _twig/docker-compose.yml/service/memcached.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
memcached:
image: {{ @('services.memcached.image') }}
labels:
- traefik.enable=false
networks:
- private
15 changes: 15 additions & 0 deletions _twig/docker-compose.yml/service/mongodb.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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:
- traefik.enable=false
networks:
- private
expose:
- 27017
volumes:
- /data/db
20 changes: 20 additions & 0 deletions _twig/docker-compose.yml/service/mysql.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% 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:
- 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 %}
42 changes: 42 additions & 0 deletions _twig/docker-compose.yml/service/nginx.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% 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'))) %}

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') %}
- traefik.enable=false
{% else %}
- traefik.backend={{ @('workspace.name') }}
- traefik.frontend.rule=Host:{{ hostnames|join(',') }}
- traefik.docker.network=my127ws
- traefik.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: {}
13 changes: 13 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,13 @@
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:
- traefik.enable=false
depends_on:
- php-fpm
networks:
- private
33 changes: 33 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,33 @@
{% 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:
- 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 %}
15 changes: 15 additions & 0 deletions _twig/docker-compose.yml/service/postgres.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
postgres:
image: {{ @('services.postgres.image') }}
labels:
- 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
8 changes: 8 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,8 @@
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:
- traefik.enable=false
networks:
- private
8 changes: 8 additions & 0 deletions _twig/docker-compose.yml/service/redis.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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:
- traefik.enable=false
networks:
- private
10 changes: 10 additions & 0 deletions _twig/docker-compose.yml/service/relay.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
relay:
build: .my127ws/docker/image/relay
labels:
- traefik.enable=false
networks:
private:
aliases:
- jaeger-relay
- mailhog-relay
shared: {}
34 changes: 34 additions & 0 deletions _twig/docker-compose.yml/service/solr.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
solr:
image: {{ @('services.solr.image') }}
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
command:
- solr-precreate
- {{ @('services.solr.environment.SOLR_CORE_NAME') }}
{% if @('services.solr.config_path') %}
- /opt/solr/server/solr/configsets/{{ @('services.solr.environment.SOLR_CORE_NAME') }}
{% elseif @('services.solr.major_version') == 4 %}
- /opt/solr/example/example-schemaless/solr/{{ @('services.solr.environment.SOLR_CORE_NAME') }}
{% endif %}
volumes:
{% if @('services.solr.config_path') %}
- {{ @('services.solr.config_path')}}:/opt/solr/server/solr/configsets/{{ @('services.solr.environment.SOLR_CORE_NAME') }}/conf
{% endif %}
{% if @('services.solr.major_version') == 4 %}
- solr_data:/opt/solr/example/solr
{% elseif @('services.solr.major_version') < 8 %}
- solr_data:/opt/solr/server/solr/mycores
{% else %}
- solr_data:/var/solr
{% endif %}
networks:
- private
- shared
11 changes: 11 additions & 0 deletions _twig/docker-compose.yml/service/tideways.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
tideways:
image: {{ @('services.tideways.image') }}
labels:
- 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 caf47f8

Please sign in to comment.