Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
103
Merge Requests
103
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
fcba8ac7
Commit
fcba8ac7
authored
May 25, 2022
by
HongzheWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack/lamp:add some default parameters/cfg files
parent
3474cec6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
13 deletions
+72
-13
stack/lamp/apache-httpd.conf.in
stack/lamp/apache-httpd.conf.in
+24
-0
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+5
-0
stack/lamp/buildout.hash.cfg
stack/lamp/buildout.hash.cfg
+8
-4
stack/lamp/instance-apache-php.cfg.in
stack/lamp/instance-apache-php.cfg.in
+27
-1
stack/lamp/instance-lamp.cfg.jinja2.in
stack/lamp/instance-lamp.cfg.jinja2.in
+1
-2
stack/lamp/instance.cfg.in
stack/lamp/instance.cfg.in
+1
-0
stack/lamp/php.ini.in
stack/lamp/php.ini.in
+6
-6
No files found.
stack/lamp/apache-httpd.conf.in
0 → 100644
View file @
fcba8ac7
<VirtualHost *:{{ parameter_dict['port'] }}>
ServerAdmin admin@example.com
DocumentRoot {{ parameter_dict['document-root'] }}/matomo
SetEnvIf Origin "^http(s)?://(.+\.)?(app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Credentials "true" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Methods "PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Headers "Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Authorization" env=ORIGIN_DOMAIN
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
<Directory {{ parameter_dict['document-root'] }}>
Options +FollowSymlinks
AllowOverride All
Require all granted
SetEnv HOME {{ parameter_dict['document-root'] }}
SetEnv HTTP_HOME {{ parameter_dict['document-root'] }}
Dav off
</Directory>
ErrorLog "{{ parameter_dict['log-dir'] }}/matomo-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/matomo-access.log" combined
</VirtualHost>
stack/lamp/buildout.cfg
View file @
fcba8ac7
...
@@ -107,6 +107,7 @@ context =
...
@@ -107,6 +107,7 @@ context =
key db_name custom-application-deployment:db-name
key db_name custom-application-deployment:db-name
key db_user custom-application-deployment:db-user
key db_user custom-application-deployment:db-user
key db_password custom-application-deployment:db-password
key db_password custom-application-deployment:db-password
key lamp_apache_httpd template-apache-httpd:target
[instance-apache-php]
[instance-apache-php]
<= template-download-base
<= template-download-base
...
@@ -120,6 +121,10 @@ context =
...
@@ -120,6 +121,10 @@ context =
[template-php.ini]
[template-php.ini]
<= template-download-base
<= template-download-base
# download apache-httpd.conf.in
[template-apache-httpd]
<= template-download-base
[erp5]
[erp5]
# lamp stack reuses erp5 stack to have mariadb, but we don't need to checkout erp5 here.
# lamp stack reuses erp5 stack to have mariadb, but we don't need to checkout erp5 here.
recipe =
recipe =
...
...
stack/lamp/buildout.hash.cfg
View file @
fcba8ac7
...
@@ -14,15 +14,15 @@
...
@@ -14,15 +14,15 @@
# not need these here).
# not need these here).
[instance]
[instance]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
a5a630377bfb0421d6993c9c2c411a23
md5sum =
b87556b0e5651bc8217c1bccbdd6b4d7
[instance-apache-php]
[instance-apache-php]
filename = instance-apache-php.cfg.in
filename = instance-apache-php.cfg.in
md5sum =
0952ef9f6cb5e259ad5519d2975d2f37
md5sum =
8506f245087dfdc02561e8739a567bd6
[instance-lamp]
[instance-lamp]
filename = instance-lamp.cfg.jinja2.in
filename = instance-lamp.cfg.jinja2.in
md5sum =
b3d68a13d7a7ffcac774f51f02a68359
md5sum =
79343539dff96f2d4592a4358d469201
[template-apache.conf]
[template-apache.conf]
filename = apache.conf.in
filename = apache.conf.in
...
@@ -30,4 +30,8 @@ md5sum = 04080510698732d84122b464fdb08c6a
...
@@ -30,4 +30,8 @@ md5sum = 04080510698732d84122b464fdb08c6a
[template-php.ini]
[template-php.ini]
filename = php.ini.in
filename = php.ini.in
md5sum = 599358f7df4c1e0de86270f5992ef904
md5sum = 980f603c34fcb008ce73a9dde2dbceb3
[template-apache-httpd]
filename = apache-httpd.conf.in
md5sum = 9940e05d5e624a7884f4e6e062355798
stack/lamp/instance-apache-php.cfg.in
View file @
fcba8ac7
...
@@ -13,6 +13,7 @@ parts =
...
@@ -13,6 +13,7 @@ parts =
php.ini-conf
php.ini-conf
apache-php-service
apache-php-service
publish-connection-information
publish-connection-information
lamp-apache-httpd
{{ parameter_dict['application-part-list'] }}
{{ parameter_dict['application-part-list'] }}
...
@@ -133,10 +134,17 @@ cert-file = ${ca-directory:certs}/httpd.crt
...
@@ -133,10 +134,17 @@ cert-file = ${ca-directory:certs}/httpd.crt
key-file = ${ca-directory:certs}/httpd.key
key-file = ${ca-directory:certs}/httpd.key
apache-config-dir = ${directory:apache.d}
apache-config-dir = ${directory:apache.d}
[lamp-apache-httpd]
recipe = slapos.recipe.template:jinja2
url = {{ lamp_apache_httpd }}
output = ${directory:apache.d}/lamp.conf
context =
section parameter_dict apache-php-configuration
[apache-php-conf]
[apache-php-conf]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
url = {{ parameter_dict['template-apache-conf'] }}
url = {{ parameter_dict['template-apache-conf'] }}
output = ${directory:etc}/apache.conf
output = ${directory:etc}/apache.conf
graceful
context =
context =
section parameter_dict apache-php-configuration
section parameter_dict apache-php-configuration
extensions = jinja2.ext.do
extensions = jinja2.ext.do
...
@@ -188,6 +196,24 @@ backend-url = ${apache-php-configuration:url}
...
@@ -188,6 +196,24 @@ backend-url = ${apache-php-configuration:url}
php-bin = {{ parameter_dict['apache-php-location'] }}/bin/php
php-bin = {{ parameter_dict['apache-php-location'] }}/bin/php
php-ini = ${php.ini-conf:output}
php-ini = ${php.ini-conf:output}
#Defaut php.ini parameters
#They have been set in file php.ini.in
#I reserve them here just for an example
#You can reset them like this in your own software
php.memory_limit = 512M
php.date.timezone = Europe/Paris
php.upload_max_filesize = 10240M
php.post_max_size = 10240M
php.session.cookie_secure = True
php.max_execution_time = 1800
php.max_input_time = 3600
php.output_buffering = 'Off'
php.max_file_uploads = 100
[php-bin]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/php
command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output}
#----------------
#----------------
#--
#--
...
...
stack/lamp/instance-lamp.cfg.jinja2.in
View file @
fcba8ac7
...
@@ -37,8 +37,7 @@ return =
...
@@ -37,8 +37,7 @@ return =
{% do publish_dict.__setitem__('backend-url', '${request-apache:connection-backend-url}') -%}
{% do publish_dict.__setitem__('backend-url', '${request-apache:connection-backend-url}') -%}
{% do monitor_base_url_dict.__setitem__('apache', '${request-apache:connection-monitor-base-url}') -%}
{% do monitor_base_url_dict.__setitem__('apache', '${request-apache:connection-monitor-base-url}') -%}
{% do mariadb_dict.__setitem__('database-list', [{'name': db_name, 'user': db_user, 'password': db_password}]) -%}
{% do mariadb_dict.__setitem__('database-list', [{'name': db_name, 'user': db_user, 'password': db_password }]) -%}
{% do mariadb_dict.__setitem__('test-database-amount', 0) -%}
{% do mariadb_dict.__setitem__('test-database-amount', 0) -%}
{% do mariadb_dict.__setitem__('tcpv4-port', 2099) -%}
{% do mariadb_dict.__setitem__('tcpv4-port', 2099) -%}
{% do mariadb_dict.__setitem__('max-slowqueries-threshold', 1000) -%}
{% do mariadb_dict.__setitem__('max-slowqueries-threshold', 1000) -%}
...
...
stack/lamp/instance.cfg.in
View file @
fcba8ac7
...
@@ -72,6 +72,7 @@ filename = template-apache-php.cfg
...
@@ -72,6 +72,7 @@ filename = template-apache-php.cfg
extra-context =
extra-context =
key custom_application_template application-parameters:custom-application-template
key custom_application_template application-parameters:custom-application-template
section parameter_dict dynamic-template-apache-php-parameters
section parameter_dict dynamic-template-apache-php-parameters
raw lamp_apache_httpd {{ lamp_apache_httpd }}
[dynamic-template-mariadb-parameters]
[dynamic-template-mariadb-parameters]
bash = {{ bash_location }}
bash = {{ bash_location }}
...
...
stack/lamp/php.ini.in
View file @
fcba8ac7
...
@@ -13,15 +13,15 @@ session.save_path = "{{ parameter_dict['tmp-dir'] }}"
...
@@ -13,15 +13,15 @@ session.save_path = "{{ parameter_dict['tmp-dir'] }}"
session.auto_start = 0
session.auto_start = 0
date.timezone = {{ instance_dict.get('php.date.timezone', 'Europe/Paris') }}
date.timezone = {{ instance_dict.get('php.date.timezone', 'Europe/Paris') }}
file_uploads = On
file_uploads = On
upload_max_filesize = {{ instance_dict.get('php.upload_max_filesize', '
8
M') }}
upload_max_filesize = {{ instance_dict.get('php.upload_max_filesize', '
10240
M') }}
post_max_size = {{ instance_dict.get('php.post_max_size', '
8
M') }}
post_max_size = {{ instance_dict.get('php.post_max_size', '
10240
M') }}
magic_quotes_gpc=Off
magic_quotes_gpc=Off
memory_limit = {{ instance_dict.get('php.memory_limit', '
128
M') }}
memory_limit = {{ instance_dict.get('php.memory_limit', '
512
M') }}
session.cookie_secure = True
session.cookie_secure = True
max_execution_time = {{ instance_dict.get('php.max_execution_time',
6
0) }}
max_execution_time = {{ instance_dict.get('php.max_execution_time',
180
0) }}
max_input_time = {{ instance_dict.get('php.max_input_time',
6
0) }}
max_input_time = {{ instance_dict.get('php.max_input_time',
360
0) }}
output_buffering = {{ instance_dict.get('php.output_buffering', 4096) }}
output_buffering = {{ instance_dict.get('php.output_buffering', 4096) }}
max_file_uploads = {{ instance_dict.get('php.max_file_uploads',
2
0) }}
max_file_uploads = {{ instance_dict.get('php.max_file_uploads',
10
0) }}
#extension_dir="./"#
#extension_dir="./"#
sys_temp_dir="{{ parameter_dict['tmp-dir'] }}"
sys_temp_dir="{{ parameter_dict['tmp-dir'] }}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment