initial: no secrets

This commit is contained in:
2024-02-12 17:01:18 +01:00
commit cf9efd55b5
186 changed files with 8697 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
- name: restart php-fpm
systemd:
name: php8.1-fpm
state: restarted
+2
View File
@@ -0,0 +1,2 @@
dependencies:
- global-handlers
+103
View File
@@ -0,0 +1,103 @@
- name: Install php dependencies
apt:
pkg:
- curl
- php
- php-cli
- php-mbstring
- unzip
- php-common
- php-mysql
- php-sqlite3
- php-gd
- php-curl
- php-json
- php-intl
- php-bcmath
- php-zip
- php-apcu
- php-mbstring
- php-xml
- php-soap
- name: Check composer installed
stat:
path: /usr/local/bin/composer
register: composer_install_location_stat
check_mode: false
- name: Download composer
get_url:
url: https://getcomposer.org/installer
dest: /root/composer-setup.php
when: not composer_install_location_stat.stat.exists
- name: Install composer
command: php composer-setup.php --install-dir=/usr/local/bin --filename=composer
when: not composer_install_location_stat.stat.exists
- name: Ensure composer world read/execute
file:
path: /usr/local/bin/composer
mode: 0755
- name: Change permissions on /var/www
file:
path: /var/www
mode: 0755
owner: www-data
group: www-data
- name: Check project exists
stat:
path: /var/www/atlantishq-cms/
register: project_stat
check_mode: false
- name: Install typo3 cms
become: true
become_user: www-data
community.general.composer:
command: create-project
arguments: "typo3/cms-base-distribution:^12 atlantishq-cms"
working_dir: /var/www/
when: not project_stat.stat.exists
- name: Install php-fpm & nginx
apt:
pkg:
- php-fpm
- nginx
- name: Configure php-fpm listen
lineinfile:
path: /etc/php/8.1/fpm/pool.d/www.conf
regex: ^listen = .*$
line: listen = 0.0.0.0:9000
notify: restart php-fpm
- name: Configure php-fpm listen allowed clients
lineinfile:
path: /etc/php/8.1/fpm/pool.d/www.conf
regex: ^listen\.allowed_clients = .*$
line: listen.allowed_clients = 127.0.0.1
notify: restart php-fpm
- name: Configure php-fpm listen allowed clients
lineinfile:
path: /etc/php/8.1/fpm/pool.d/www.conf
regex: ^;*listen.allowed_clients = .*$
#line: listen.allowed_clients = 192.168.122.1
line: listen.allowed_clients = 127.0.0.1
notify: restart php-fpm
- name: Configure nginx
template:
src: default-nginx.conf
dest: /etc/nginx/sites-available/default
notify: restart nginx
- name: Configure typo3
template:
src: typo3-settings.php
dest: /var/www/atlantishq-cms/config/system/settings.php
@@ -0,0 +1,26 @@
#log_format scripts '$fastcgi_path_info $document_root$fastcgi_script_name > $request';
server {
#access_log /var/log/nginx/scripts.log scripts;
include fastcgi.conf;
include fastcgi_params;
listen 8080;
index index.php index.html;
root /var/www/atlantishq-cms/public/;
location ~ \.php$ {
try_files $uri $uri/$uri/ /index.php$is_args$args =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass localhost:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
add_header X-ATHQ-HANDLER cms always;
}
location /typo3/ {
absolute_redirect off;
try_files $uri /typo3/index.php$is_args$args;
}
}
@@ -0,0 +1,103 @@
<?php
return [
'BE' => [
'debug' => true,
'installToolPassword' => '$argon2i$v=19$m=65536,t=16,p=1$cFhzV25oZ1o2REZQYk9NUQ$OpTaCKkPonhdJs+OYn72vVPoJ4h5VwDGxcd/3M5VsyY',
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],
'DB' => [
'Connections' => [
'Default' => [
'driver' => 'pdo_sqlite',
'path' => '/var/www/atlantishq-cms/var/sqlite/cms-0700a973.sqlite',
],
],
],
'EXTENSIONS' => [
'backend' => [
'backendFavicon' => '',
'backendLogo' => '',
'loginBackgroundImage' => '',
'loginFootnote' => '',
'loginHighlightColor' => '',
'loginLogo' => '',
'loginLogoAlt' => '',
],
'extensionmanager' => [
'automaticInstallation' => '1',
'offlineMode' => '0',
],
],
'FE' => [
'debug' => true,
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],
'LOG' => [
'TYPO3' => [
'CMS' => [
'deprecations' => [
'writerConfiguration' => [
'notice' => [
'TYPO3\CMS\Core\Log\Writer\FileWriter' => [
'disabled' => false,
],
],
],
],
],
],
],
'MAIL' => [
'transport' => 'sendmail',
'transport_sendmail_command' => '/usr/sbin/sendmail -t -i',
'transport_smtp_encrypt' => '',
'transport_smtp_password' => '',
'transport_smtp_server' => '',
'transport_smtp_username' => '',
],
'SYS' => [
'features' => [
'security.backend.enforceReferrer' => false
],
'caching' => [
'cacheConfigurations' => [
'hash' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
],
'imagesizes' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
'options' => [
'compression' => true,
],
],
'pages' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
'options' => [
'compression' => true,
],
],
'rootline' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
'options' => [
'compression' => true,
],
],
],
],
'devIPmask' => '',
'displayErrors' => 0,
'encryptionKey' => 'ec657040986d5104b1f84564578f5df3bffd7049a9a58e0c86a05232899be6ef8987c268895a45822e34ede03dc1f1c4',
'exceptionalErrors' => 4096,
'sitename' => 'cms',
'systemMaintainers' => [
1,
],
'trustedHostsPattern' => '.*.*',
],
];