-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8ba4b3
commit 0f9ec0d
Showing
177 changed files
with
6,475 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
13
_twig/docker-compose.yml/service/php-fpm-exporter.yml.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.