Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
8ccb88503a
|
|||
|
3f99ea7fcd
|
|||
|
9904b9a038
|
|||
|
93c4534204
|
|||
|
43a8ccff28
|
|||
|
38a3d44897
|
|||
|
92ca7f27ab
|
@@ -13,6 +13,8 @@ traefik_image_traefik: "traefik:v3.2"
|
||||
# to install or not traefik as front-end
|
||||
traefik_install: true
|
||||
|
||||
docker_secrets: []
|
||||
|
||||
# default chill config for each environment
|
||||
default_chill:
|
||||
chill_environment: main_env
|
||||
@@ -21,7 +23,16 @@ default_chill:
|
||||
host: 'devpms.samusocial.be'
|
||||
tls_config: self_signed
|
||||
expose_port: false # can be false, or the port number
|
||||
# use rabbitmq as message broker. If not in use, it will be replaced by doctrine
|
||||
rabbitmq_install: true
|
||||
proxy_ips:
|
||||
# 127.0.0.1 is always added
|
||||
- 192.168.0.0/16
|
||||
- 10.0.0.0/8
|
||||
- 172.16.0.0/12
|
||||
chill_config:
|
||||
# supplementary environment values to set in the in the env file
|
||||
supplementary_environment_values: {}
|
||||
trusted_hosts: 'devpms.samusocial.be '
|
||||
database_host: '172.17.17.71'
|
||||
database_port: '5432'
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/rabbitmq.env"
|
||||
owner: "{{ as_user }}"
|
||||
mode: '0400'
|
||||
when: chill.rabbitmq_install
|
||||
|
||||
- name: Create directory for storing configuration
|
||||
ansible.builtin.file:
|
||||
|
||||
+10
-1
@@ -24,6 +24,11 @@ services:
|
||||
{%+ endif +%}
|
||||
{% endif %}
|
||||
|
||||
{% if chill.expose_port is not false +%}
|
||||
ports:
|
||||
- "{{ chill.expose_port }}:80"
|
||||
{%+ endif %}
|
||||
|
||||
networks:
|
||||
|
||||
{% if traefik_install %}
|
||||
@@ -44,7 +49,9 @@ services:
|
||||
links:
|
||||
- redis
|
||||
- relatorio
|
||||
{% if chill.rabbitmq_install +%}
|
||||
- rabbitmq
|
||||
{%+ endif %}
|
||||
|
||||
{% if chill.add_postgres -%}
|
||||
- database
|
||||
@@ -66,7 +73,7 @@ services:
|
||||
sleep 3 && bin/console cache:clear &&
|
||||
while ! [ -f /tmp/kill_me ];
|
||||
do
|
||||
su -s /bin/bash -c 'php -d memory_limit=2G bin/console messenger:consume priority async --limit=20 --time-limit=600 -v' "www-data";
|
||||
su -p -s /bin/bash -c 'php -d memory_limit=2G bin/console messenger:consume priority async --limit=20 --time-limit=600 -v' "www-data";
|
||||
done;
|
||||
pre_stop:
|
||||
- command:
|
||||
@@ -132,6 +139,7 @@ services:
|
||||
# rabbitmq:
|
||||
# condition: service_healthy
|
||||
|
||||
{% if chill.rabbitmq_install +%}
|
||||
rabbitmq:
|
||||
image: "{{ chill_image_rabbitmq }}"
|
||||
env_file:
|
||||
@@ -144,6 +152,7 @@ services:
|
||||
networks:
|
||||
- default
|
||||
restart: always
|
||||
{% endif %}
|
||||
|
||||
networks:
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
# this file is managed by ansible. Do not edit it by hand
|
||||
|
||||
framework:
|
||||
{% if traefik_install +%}
|
||||
trusted_proxies: '127.0.0.1,REMOTE_ADDR{% for ip in traefik_trusted_ips|default([]) %},{{ ip }}{% endfor %}'
|
||||
{%+ else %}
|
||||
trusted_proxies: '127.0.0.1,{% for ip in chill.proxy_ips %}{{ ip }}{% if not loop.last %},{% endif %}{% endfor %}'
|
||||
{%+ endif %}
|
||||
trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port']
|
||||
|
||||
parameters:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
framework:
|
||||
messenger:
|
||||
transports:
|
||||
{% if chill.rabbitmq_install +%}
|
||||
async:
|
||||
dsn: '%env(RABBITMQ_URL)%/async'
|
||||
options:
|
||||
@@ -12,5 +13,9 @@ framework:
|
||||
async: ~
|
||||
auto_setup: true
|
||||
priority: '%env(RABBITMQ_URL)%/priority'
|
||||
{% else +%}
|
||||
async: 'doctrine://default'
|
||||
priority: 'doctrine://default'
|
||||
{% endif +%}
|
||||
failed: 'doctrine://default?queue_name=failed'
|
||||
sync: 'sync://'
|
||||
sync: 'sync://'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
parameters:
|
||||
log_prefix: 'test'
|
||||
log_prefix: '{{ chill.chill_environment }}'
|
||||
monolog:
|
||||
# make a "notifier" channel available
|
||||
channels: ['notifier']
|
||||
@@ -16,6 +16,10 @@ monolog:
|
||||
path: "%kernel.logs_dir%/notifier-%log_prefix%.log"
|
||||
level: info
|
||||
channels: [ 'notifier' ]
|
||||
errors_log:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/error-%log_prefix%.log"
|
||||
level: error
|
||||
privacy_log:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/privacy-%log_prefix%.log"
|
||||
@@ -25,9 +29,15 @@ monolog:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/default-%log_prefix%.log"
|
||||
level: info
|
||||
channels: [ '!event', '!doctrine', '!console', '!chill',]
|
||||
channels: [ '!event', '!doctrine', '!console', '!chill' ]
|
||||
deprecation_log:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/deprecation-%log_prefix%.log"
|
||||
level: info
|
||||
channels: [ 'deprecation' ]
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: [ '!event', '!doctrine', '!console']
|
||||
level: error
|
||||
channels: [ '!event', '!doctrine', '!console', '!deprecation']
|
||||
bubble: true
|
||||
|
||||
@@ -41,7 +41,12 @@ MAILER_URL={{ chill.chill_config.mailer_url }}
|
||||
JWT_PASSPHRASE={{ chill.chill_config.jwt_passphrase }}
|
||||
JWT_SECRET_KEY={{ chill.chill_config.jwt_secret_key }}
|
||||
JWT_PUBLIC_KEY={{ chill.chill_config.jwt_public_key }}
|
||||
{% if chill.rabbitmq_install %}
|
||||
RABBITMQ_URL=amqp://{{ chill.chill_config.rabbitmq_user }}:{{ chill.chill_config.rabbitmq_password }}@rabbitmq/%2f
|
||||
{% endif %}
|
||||
DATABASE_URL=postgres://{{ chill.chill_config.database_user }}:{{ chill.chill_config.database_password }}@{% if chill.add_postgres %}database:5432{% else %}{{ chill.chill_config.database_host }}{% endif %}/{{ chill.chill_config.database_name }}?sslmode=prefer&charset=utf8&serverVersion={{ chill.chill_config.database_version }}
|
||||
EDITOR_SERVER={{ chill.chill_config.editor_server }}
|
||||
OVHCLOUD_DSN={{ chill.chill_config.ovhcloud_dsn }}
|
||||
{% for k, v in chill.chill_config.supplementary_environment_values.items() %}
|
||||
{{ k }}="{{ v }}"
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user