mirror of
https://github.com/Ladebeze66/Inception.git
synced 2026-11-09 13:47:09 +01:00
ff
This commit is contained in:
0
srcs/requirements/mariadb/.dockerignore
Normal file
0
srcs/requirements/mariadb/.dockerignore
Normal file
25
srcs/requirements/mariadb/Dockerfile
Normal file
25
srcs/requirements/mariadb/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM debian:bullseye
|
||||
|
||||
# Exposer le port 3306
|
||||
EXPOSE 3306
|
||||
|
||||
# Installer les paquets nécessaires
|
||||
RUN apt update -y && apt upgrade -y && \
|
||||
apt-get install -y mariadb-server mariadb-client gettext-base procps && \
|
||||
apt-get clean
|
||||
|
||||
# Créer les répertoires requis
|
||||
RUN mkdir -p /run/mysqld /var/www && \
|
||||
chown mysql:mysql /run/mysqld
|
||||
|
||||
# Copier les fichiers de configuration
|
||||
COPY ./conf/50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
COPY ./tools/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Assurer les permissions correctes pour le script et les fichiers SQL
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Utiliser le script d'entrée
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
CMD ["mariadbd"]
|
||||
19
srcs/requirements/mariadb/conf/50-server.cnf
Normal file
19
srcs/requirements/mariadb/conf/50-server.cnf
Normal file
@@ -0,0 +1,19 @@
|
||||
[server]
|
||||
|
||||
[mysql]
|
||||
default-character-set=utf8
|
||||
|
||||
[mysqld]
|
||||
|
||||
user = mysql
|
||||
user = mysql
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
pid-file = /run/mysqld/mysqld.pid
|
||||
basedir = /usr
|
||||
datadir = /var/lib/mysql
|
||||
tmpdir = /tmp
|
||||
lc-messages-dir = /usr/share/mysql
|
||||
lc-messages = en_US
|
||||
skip-external-locking
|
||||
|
||||
bind-address = 0.0.0.0
|
||||
20
srcs/requirements/mariadb/tools/entrypoint.sh
Normal file
20
srcs/requirements/mariadb/tools/entrypoint.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting MariaDB..."
|
||||
service mariadb start
|
||||
|
||||
sleep 2
|
||||
|
||||
echo "Creating user..."
|
||||
mysql -e "CREATE USER IF NOT EXISTS \`${MYSQL_USER}\`@'%' IDENTIFIED BY '${MYSQL_PASSWORD}';"
|
||||
mysql -e "GRANT ALL PRIVILEGES ON \`${MYSQL_DATABASE}\`.* TO '${MYSQL_USER}'@'%';"
|
||||
|
||||
mysql -e "FLUSH PRIVILEGES;"
|
||||
|
||||
echo "Generating database..."
|
||||
mysql -e "CREATE DATABASE IF NOT EXISTS ${MYSQL_DATABASE};"
|
||||
|
||||
echo "Stopping MariaDB..."
|
||||
mysqladmin -u root shutdown
|
||||
|
||||
exec "$@"
|
||||
0
srcs/requirements/nginx/.dockerignore
Normal file
0
srcs/requirements/nginx/.dockerignore
Normal file
21
srcs/requirements/nginx/Dockerfile
Normal file
21
srcs/requirements/nginx/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM debian:bullseye
|
||||
|
||||
# Installer Nginx et OpenSSL
|
||||
RUN apt update -y && apt upgrade -y
|
||||
RUN apt-get install -y nginx vim openssl
|
||||
|
||||
# Créer le répertoire requis pour les certificats SSL
|
||||
RUN mkdir -p /etc/nginx/ssl
|
||||
|
||||
# Copier les configurations de Nginx et le fichier default
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Générer des certificats auto-signés pour SSL
|
||||
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/inception.key -out /etc/nginx/ssl/inception.crt -subj "/C=FR/ST=IDF/L=Perpignan/O=42/OU=42/CN=fgras-ca.42.fr"
|
||||
|
||||
RUN mkdir -p /run/nginx
|
||||
|
||||
EXPOSE 443
|
||||
|
||||
# Démarrer Nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
28
srcs/requirements/nginx/conf/default
Normal file
28
srcs/requirements/nginx/conf/default
Normal file
@@ -0,0 +1,28 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name fgras.42.fr;
|
||||
server_name www.fgras.42.fr;
|
||||
|
||||
# SSL certificates
|
||||
ssl_certificate /etc/nginx/ssl/inception.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/inception.key;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass wordpress:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
41
srcs/requirements/nginx/conf/nginx.conf
Normal file
41
srcs/requirements/nginx/conf/nginx.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
events{}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
# SSL certificates
|
||||
ssl_certificate /etc/nginx/ssl/inception.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/inception.key;
|
||||
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
|
||||
server_name fgras-ca.42.fr;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass wordpress:9000;
|
||||
fastcgi_index index.php;
|
||||
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # Full path to the script file
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info; # Extra path information
|
||||
fastcgi_param QUERY_STRING $query_string; # Query string
|
||||
fastcgi_param REQUEST_METHOD $request_method; # HTTP request method
|
||||
fastcgi_param CONTENT_TYPE $content_type; # Content type
|
||||
fastcgi_param CONTENT_LENGTH $content_length; # Content length
|
||||
fastcgi_param SERVER_NAME $server_name; # Server name
|
||||
fastcgi_param SERVER_PORT $server_port; # Server port
|
||||
}
|
||||
}
|
||||
}
|
||||
0
srcs/requirements/wordpress/.dockerignore
Normal file
0
srcs/requirements/wordpress/.dockerignore
Normal file
32
srcs/requirements/wordpress/Dockerfile
Normal file
32
srcs/requirements/wordpress/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
FROM debian:bullseye
|
||||
|
||||
# Installer les paquets nécessaires
|
||||
RUN apt update -y && apt upgrade -y && \
|
||||
apt-get install -y php7.4-fpm php7.4-mysql mariadb-client wget curl vim && \
|
||||
mkdir -p /var/www/html && \
|
||||
wget https://fr.wordpress.org/wordpress-6.0-fr_FR.tar.gz -O /tmp/wordpress.tar.gz && \
|
||||
tar -xzvf /tmp/wordpress.tar.gz -C /var/www/html --strip-components=1 && \
|
||||
rm /tmp/wordpress.tar.gz && \
|
||||
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar && mv wp-cli.phar /usr/local/bin/wp
|
||||
|
||||
#RUN apt-get install sendmail -y
|
||||
|
||||
# Copier les fichiers de configuration PHP et le script d'auto-configuration
|
||||
COPY ./conf/www.conf /etc/php/7.4/fpm/pool.d/www.conf
|
||||
COPY ./conf/wp-config.php /var/www/html/
|
||||
COPY ./tools/auto_config.sh /usr/local/bin/
|
||||
|
||||
# Assurer les bonnes permissions pour les fichiers
|
||||
RUN chmod +x /usr/local/bin/auto_config.sh && \
|
||||
chmod -R 755 /var/www/html && \
|
||||
chown -R www-data:www-data /var/www/html ; \
|
||||
chown www-data:www-data /var/www/html/index.php
|
||||
RUN chmod -R 777 /var/www/html
|
||||
COPY ./conf/web /var/www/html
|
||||
RUN chmod -R 777 /var/www/html
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/auto_config.sh"]
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["php-fpm7.4", "-F"]
|
||||
BIN
srcs/requirements/wordpress/conf/web/Inception_Visual.webp
Normal file
BIN
srcs/requirements/wordpress/conf/web/Inception_Visual.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 740 KiB |
170
srcs/requirements/wordpress/conf/web/index.html
Normal file
170
srcs/requirements/wordpress/conf/web/index.html
Normal file
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>INCEPTION - 42 Perpignan</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body, html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #141414;
|
||||
overflow: hidden;
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
position: relative;
|
||||
}
|
||||
.container {
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.title {
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
color: #ffffff; /* Blanc */
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
.school {
|
||||
font-size: 3em;
|
||||
font-weight: bold;
|
||||
color: #0000ff; /* Bleu */
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 20px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.pseudo {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #8b0000; /* Rouge tendant vers le violet */
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
.datetime {
|
||||
font-size: 1.5em;
|
||||
color: #ff6666; /* Rouge plus clair */
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
.button {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 10px 20px;
|
||||
font-size: 1.5em;
|
||||
background-color: rgba(255, 255, 255, 0.5); /* Transparence */
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.jump-scare {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.jump-scare img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
@keyframes rainEffect {
|
||||
0% {
|
||||
clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
|
||||
}
|
||||
100% {
|
||||
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
||||
}
|
||||
}
|
||||
.background {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-image: url('Inception_Visual.webp');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
animation: zoomIn 20s infinite;
|
||||
}
|
||||
@keyframes zoomIn {
|
||||
0% { transform: scale(1); }
|
||||
50% { transform: scale(1.1); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="background"></div>
|
||||
<div class="container">
|
||||
<div class="title">INCEPTION</div>
|
||||
<div class="school">42 Perpignan</div>
|
||||
<div class="pseudo">fgras-ca</div>
|
||||
<div class="datetime" id="datetime"></div>
|
||||
<button class="button" id="myButton">Click there!!</button>
|
||||
<div class="jump-scare" id="jumpScare">
|
||||
<!-- Columns will be generated by JavaScript -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function updateDateTime() {
|
||||
const now = new Date();
|
||||
const datetimeElement = document.getElementById('datetime');
|
||||
const options = { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit' };
|
||||
datetimeElement.textContent = now.toLocaleDateString('fr-FR', options);
|
||||
}
|
||||
setInterval(updateDateTime, 1000);
|
||||
updateDateTime();
|
||||
|
||||
function showButton() {
|
||||
document.getElementById('myButton').style.display = 'block';
|
||||
}
|
||||
setTimeout(showButton, 5000);
|
||||
|
||||
document.getElementById('myButton').addEventListener('click', function() {
|
||||
const jumpScareContainer = document.getElementById('jumpScare');
|
||||
const imageSrc = 'jump_scare_image.webp'; // Update with your image path
|
||||
const columns = 50; // Number of columns
|
||||
const columnWidth = 100 / columns;
|
||||
jumpScareContainer.style.width = '80%';
|
||||
jumpScareContainer.style.height = '80%';
|
||||
|
||||
for (let i = 0; i < columns; i++) {
|
||||
const column = document.createElement('div');
|
||||
column.classList.add('column');
|
||||
column.style.position = 'absolute';
|
||||
column.style.top = '0';
|
||||
column.style.left = `${i * columnWidth}%`;
|
||||
column.style.width = `${columnWidth}%`;
|
||||
column.style.height = '100%';
|
||||
column.style.backgroundImage = `url(${imageSrc})`;
|
||||
column.style.backgroundSize = `${columns * 100}% 100%`;
|
||||
column.style.backgroundPosition = `${-i * 100}% 0`;
|
||||
column.style.animation = `rainEffect 10s ease-in-out ${Math.random() * 5}s forwards`;
|
||||
jumpScareContainer.appendChild(column);
|
||||
}
|
||||
|
||||
jumpScareContainer.style.display = 'block';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
170
srcs/requirements/wordpress/conf/web/index.php
Normal file
170
srcs/requirements/wordpress/conf/web/index.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>INCEPTION - 42 Perpignan</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body, html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #141414;
|
||||
overflow: hidden;
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
position: relative;
|
||||
}
|
||||
.container {
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.title {
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
color: #ffffff; /* Blanc */
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
.school {
|
||||
font-size: 3em;
|
||||
font-weight: bold;
|
||||
color: #0000ff; /* Bleu */
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 20px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.pseudo {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #8b0000; /* Rouge tendant vers le violet */
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
.datetime {
|
||||
font-size: 1.5em;
|
||||
color: #ff6666; /* Rouge plus clair */
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
.button {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 10px 20px;
|
||||
font-size: 1.5em;
|
||||
background-color: rgba(255, 255, 255, 0.5); /* Transparence */
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.jump-scare {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.jump-scare img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
@keyframes rainEffect {
|
||||
0% {
|
||||
clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
|
||||
}
|
||||
100% {
|
||||
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
||||
}
|
||||
}
|
||||
.background {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-image: url('Inception_Visual.webp');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
animation: zoomIn 20s infinite;
|
||||
}
|
||||
@keyframes zoomIn {
|
||||
0% { transform: scale(1); }
|
||||
50% { transform: scale(1.1); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="background"></div>
|
||||
<div class="container">
|
||||
<div class="title">INCEPTION</div>
|
||||
<div class="school">42 Perpignan</div>
|
||||
<div class="pseudo">fgras-ca</div>
|
||||
<div class="datetime" id="datetime"></div>
|
||||
<button class="button" id="myButton">Click there!!</button>
|
||||
<div class="jump-scare" id="jumpScare">
|
||||
<!-- Columns will be generated by JavaScript -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function updateDateTime() {
|
||||
const now = new Date();
|
||||
const datetimeElement = document.getElementById('datetime');
|
||||
const options = { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit' };
|
||||
datetimeElement.textContent = now.toLocaleDateString('fr-FR', options);
|
||||
}
|
||||
setInterval(updateDateTime, 1000);
|
||||
updateDateTime();
|
||||
|
||||
function showButton() {
|
||||
document.getElementById('myButton').style.display = 'block';
|
||||
}
|
||||
setTimeout(showButton, 5000);
|
||||
|
||||
document.getElementById('myButton').addEventListener('click', function() {
|
||||
const jumpScareContainer = document.getElementById('jumpScare');
|
||||
const imageSrc = 'jump_scare_image.webp'; // Update with your image path
|
||||
const columns = 50; // Number of columns
|
||||
const columnWidth = 100 / columns;
|
||||
jumpScareContainer.style.width = '80%';
|
||||
jumpScareContainer.style.height = '80%';
|
||||
|
||||
for (let i = 0; i < columns; i++) {
|
||||
const column = document.createElement('div');
|
||||
column.classList.add('column');
|
||||
column.style.position = 'absolute';
|
||||
column.style.top = '0';
|
||||
column.style.left = `${i * columnWidth}%`;
|
||||
column.style.width = `${columnWidth}%`;
|
||||
column.style.height = '100%';
|
||||
column.style.backgroundImage = `url(${imageSrc})`;
|
||||
column.style.backgroundSize = `${columns * 100}% 100%`;
|
||||
column.style.backgroundPosition = `${-i * 100}% 0`;
|
||||
column.style.animation = `rainEffect 10s ease-in-out ${Math.random() * 5}s forwards`;
|
||||
jumpScareContainer.appendChild(column);
|
||||
}
|
||||
|
||||
jumpScareContainer.style.display = 'block';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
srcs/requirements/wordpress/conf/web/jump_scare_image.webp
Normal file
BIN
srcs/requirements/wordpress/conf/web/jump_scare_image.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 380 KiB |
32
srcs/requirements/wordpress/conf/wp-config.php
Normal file
32
srcs/requirements/wordpress/conf/wp-config.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
define('DB_NAME', getenv('MYSQL_DATABASE'));
|
||||
define('DB_USER', getenv('MYSQL_USER'));
|
||||
define('DB_PASSWORD', getenv('MYSQL_PASSWORD'));
|
||||
define('DB_HOST', 'mariadb');
|
||||
define('DB_CHARSET', 'utf8');
|
||||
define('URL', getenv('DOMAIN_NAME'));
|
||||
define('TITLE', getenv('WP_TITLE'));
|
||||
define('ADMIN_USER', getenv('WP_ADMIN_USR'));
|
||||
define('ADMIN_PASSWORD', getenv('WP_ADMIN_PWD'));
|
||||
define('ADMIN_EMAIL', getenv('WP_ADMIN_EMAIL'));
|
||||
define('WP_HOME', 'https://' . getenv('DOMAIN_NAME'));
|
||||
define('WP_SITEURL', 'https://' . getenv('DOMAIN_NAME'));
|
||||
define('WP_USR', getenv('fgras'));
|
||||
|
||||
define('AUTH_KEY', 'AIE4!9u^Xf93DSe(-Y-=v$CU#f}N5qwR/43{/A_?aX@6{!8Ysk^G];W= DXtN.pV');
|
||||
define('SECURE_AUTH_KEY', ';o*Qw7fZg,=2{SpKy8Ic9<=wGJAPt|8s<.yxfTcrSQgvH[/+!/@l20?1nd^C#MS`');
|
||||
define('LOGGED_IN_KEY', ')?zr-W7s~RDR5PW|V6Ie`9Heq~T23IeQeD%*Z/U^|b%3 sk+z`3m|)#zyRr2pf=!');
|
||||
define('NONCE_KEY', 'Gtp-]EJS)-T&4NQP4R$-|2=5w}p|Ac:UFX#+ bU$%1|2[H6xH=;zIvH$)r)q2Y>v');
|
||||
define('AUTH_SALT', 'P`?.eaIu-G3fZYiN|/X[Sdc!ZVu9Lf<J}0&%/5B0Tp~)<),WqGdpKgC~W>vP>26(');
|
||||
define('SECURE_AUTH_SALT', 'ZnDGUX{EtppgS7gTLqg|xYcS26(WB-xP3?ldWSs|Ak;UTWpJ<SCoh(]2sE8(jL9a');
|
||||
define('LOGGED_IN_SALT', 'h}7^=g(R+c#[T3tIu3|wJpBQ{]aheu(+{k>`fGisKDii7agi^P}-@}Gm#m>A6Gb|');
|
||||
define('NONCE_SALT', 'ZaiFh{H~?Z34?18v[=Wi<T0k&nQMm2%L:l:|:z<f[knH^yz&#oEaR0g6h1Z-MLzH');
|
||||
|
||||
$table_prefix = 'wp_';
|
||||
|
||||
define('WP_DEBUG', false);
|
||||
|
||||
if ( !defined('ABSPATH') )
|
||||
define('ABSPATH', dirname(__FILE__) . '/');
|
||||
|
||||
require_once(ABSPATH . 'wp-settings.php');
|
||||
12
srcs/requirements/wordpress/conf/www.conf
Normal file
12
srcs/requirements/wordpress/conf/www.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
[www]
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = wordpress:9000
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_Servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
clear_env = no
|
||||
31
srcs/requirements/wordpress/tools/auto_config.sh
Normal file
31
srcs/requirements/wordpress/tools/auto_config.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Créer le répertoire pour le PID de PHP-FPM et définir les permissions
|
||||
mkdir -p /run/php
|
||||
chown www-data:www-data /run/php
|
||||
|
||||
# Télécharger WP-CLI si nécessaire
|
||||
if [ ! -f /usr/local/bin/wp ]; then
|
||||
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
||||
chmod +x wp-cli.phar
|
||||
mv wp-cli.phar /usr/local/bin/wp
|
||||
fi
|
||||
|
||||
# Télécharger et extraire WordPress
|
||||
if [ ! -f /var/www/html/wp-config.php ]; then
|
||||
wget https://fr.wordpress.org/wordpress-6.0-fr_FR.tar.gz -O /tmp/wordpress.tar.gz
|
||||
tar -xzvf /tmp/wordpress.tar.gz -C /var/www/html --strip-components=1
|
||||
chown -R www-data:www-data /var/www/html
|
||||
chmod -R 755 /var/www/html
|
||||
chmod -R 777 /var/www/html
|
||||
fi
|
||||
|
||||
# Installer WordPress
|
||||
if ! $(wp core is-installed --path='/var/www/html' --allow-root); then
|
||||
wp core install --url=${DOMAIN_NAME} --title=${WP_TITLE} --admin_user=${WP_ADMIN_USR} --admin_password=${WP_ADMIN_PWD} --admin_email=${WP_ADMIN_EMAIL} --path='/var/www/html' --allow-root
|
||||
echo "=== WordPress installed ==="
|
||||
else
|
||||
echo "=== WordPress is already installed ==="
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user