├── Makefile ├── README.md ├── images ├── ftp_server_filezilla.png ├── hugo.png ├── nginxLocalImages.png ├── static_page.png └── wordpress_page.png └── scrs ├── .env ├── docker-compose.yml └── requirements ├── bonus ├── adminer │ ├── Dockerfile │ └── conf │ │ └── www.conf ├── ftp_server │ ├── Dockerfile │ ├── conf │ │ └── vsftpd.conf │ └── tools │ │ └── server_ftp.sh ├── hugo │ ├── Dockerfile │ └── conf │ │ ├── avatar.jpg │ │ └── config.toml ├── redis │ ├── Dockerfile │ └── tools │ │ └── redis.sh └── static_page │ ├── Dockerfile │ └── conf │ ├── 42fitness.jpg │ ├── about.md │ ├── avatar.jpg │ ├── config.toml │ └── presentation.md ├── mariadb ├── Dockerfile ├── conf │ ├── mysqld.conf │ └── wordpress.sql └── tools │ └── mariadb.sh ├── nginx ├── Dockerfile └── conf │ └── nginx.conf └── wordpress ├── Dockerfile ├── conf └── www.conf └── tools └── create_wordpress.sh /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @docker compose -f ./scrs/docker-compose.yml up -d --build 3 | 4 | down: 5 | @docker compose -f ./scrs/docker-compose.yml down 6 | 7 | re: 8 | @docker compose -f scrs/docker-compose.yml up -d --build 9 | 10 | clean: 11 | @docker stop $$(docker ps -qa);\ 12 | docker rm $$(docker ps -qa);\ 13 | docker rmi -f $$(docker images -qa);\ 14 | docker volume rm $$(docker volume ls -q);\ 15 | docker network rm $$(docker network ls -q);\ 16 | 17 | .PHONY: all re down clean -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Inception 2 | 3 | This project from 42 school aims to broaden your knowledge of system administration by using Docker. IIn this tutorial You will virtualize several Docker images, creating them in your new personal virtual machine. In this read.me you will have an inception tutorial to know how the project works. 4 | 5 | ## Important things to read before beginning the project 6 | 7 | 1. **Don't try to do all the containers** (Nginx, wordpress and mariaDB) at the same time. 8 | You will be lost and you will not understand properly how it works. Do it step by step. 9 | 10 | 2. **Begin with Nginx** by displaying an index.html page 11 | - Learn first how to launch a docker image && to execute this image **without using docker-compose** 12 | - Learn How to display an html page on http://localhost:80" 13 | - Learn how to display an html page with SSL on http://localhost:443" 14 | 15 | 3. **Do wordpress** 16 | - You can begin from here the docker-compose file, you don't need it before 17 | 18 | 4. **Finish with MariaDB.** 19 | 20 | You want to try if each container works in general? No worries, you will be able to do it by importing images for wordpress and mariaDB from the hub. (if you read this for the first time, I invite you to begin to read this beautiful READ.ME and put a star on it! It helps!) 21 | 22 | - The 2 github which helped me a lot for the project : [llescure](https://github.com/llescure/42_Inception) and [malatini](https://github.com/42cursus/inception) 23 | - This github which helped me for the bonus [twagger](https://github.com/twagger/inception) 24 | 25 | If you have questions: please contact me, I will be glad to give you an answer ! my discord username: vbachele#7949 26 | 27 | # SUMMARY 28 | 29 | ### 1. [DEFINITIONS](https://github.com/vbachele/Inception/blob/main/README.md#definitions) 30 | ### 2. [DOCKER](https://github.com/vbachele/Inception/blob/main/README.md#Docker) 31 | ### 3. [NGINX](https://github.com/vbachele/Inception/blob/main/README.md#NGINX) 32 | ### 4. [WORDPRESS](https://github.com/vbachele/Inception/blob/main/README.md#WORDPRESS) 33 | ### 4. [MARIADB](https://github.com/vbachele/Inception/blob/main/README.md#MARIADB) 34 | ### 5. [BONUS](https://github.com/vbachele/Inception/blob/main/README.md#BONUS) 35 | - [REDIS](https://github.com/vbachele/Inception/blob/main/README.md#REDIS) 36 | - [FTP-server](https://github.com/vbachele/Inception/blob/main/README.md#FTP-SERVER) 37 | - [Adminer](https://github.com/vbachele/Inception/blob/main/README.md#ADMINER) 38 | - [Service of my choice (hugo)](https://github.com/vbachele/Inception/blob/main/README.md#Service-of-my-choice) 39 | - [Static web page](https://github.com/vbachele/Inception/blob/main/README.md#Static-web-page) 40 | 41 | # Definitions 42 | ## What is a docker ? 43 | Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production. 44 | Docker provides the ability to package and run an application in a loosely isolated environment called a container. 45 | 46 | ## What is a docker-compose ? 47 | [What is docker in general](https://www.educative.io/blog/docker-compose-tutorial) 48 | [What is docker network](https://www.aquasec.com/cloud-native-academy/docker-container/docker-networking/) 49 | Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. 50 | 51 | ## What is a docker-file ? 52 | Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession. 53 | 54 | ## How to install docker on MACOS 55 | For this project, I am on my personal mac so I don't need to use the virtual machine to use a sudo command. 56 | I had to install docker. First, you need: 57 | - I went directly to the docker website and I downloaded docker [Link to the website](https://docs.docker.com/desktop/install/mac-install/) 58 | - I installed docker on the machine 59 | - I tested to run a dockerfile thanks to the command docker run hello-world 60 | 61 | ## Useful things to know about inception dockers and containers 62 | - On the mac, Apache service is installed by default. I deleted Apache from my computer to avoid any problem with nginx 63 | - If you are at 42 on their computer you should stop these services which are running by default 64 | ```c 65 | sudo service nginx stop 66 | sudo service mariadb stop 67 | sudo service apache2 stop 68 | sudo service mysql stop 69 | ``` 70 | 71 | # DOCKER 72 | 73 | ## Important commands to use docker 74 | - [Best practices for building containers](https://cloud.google.com/architecture/best-practices-for-building-containers) 75 | 76 | ### General docker commands 77 | ```c 78 | - docker ps or docker ps -a //show the names of all the containers you have + the id you need and the port associated. 79 | - docker pull "NameOfTheImage" // pull an image from dockerhub 80 | - docker "Three first letter of your docker" // show the logs of your last run of dockers 81 | - docker rm $(docker ps -a -q) //allow to delete all the opened images 82 | - docker exec -it "Three first letter of your docker" sh // to execute the program with the shell 83 | ``` 84 | 85 | ### Docker run 86 | 87 | ```c 88 | - docker run "name of the docker image" //to run the docker image 89 | - docker run -d, // run container in background 90 | - docker run -p,// publish a container's port to the host 91 | - docker run -P, // publish all exposed port to random ports 92 | - docker run -it "imageName", //le programme continuera de fonctionner et on pourra interagir avec le container 93 | - docker run -name sl mysql, //give a name for the container instead an ID 94 | - docker run -d -p 7000:80 test:latest 95 | ``` 96 | 97 | ### Docker image 98 | ```c 99 | - docker image rm -f "image name/id", //delete the image, if the image is running you need to kill it first. 100 | - docker image kill "name", //stop a running image, 101 | ``` 102 | 103 | ## How to write a docker file 104 | - Create a filename dockerfile 105 | - Write your command inside the doc 106 | - Build the dockerfile with the command "docker build -t "nameYouChoose"." 107 | - Execute the dockerfile with the command: docker run "nameYouChoose" 108 | 109 | Here are the most common types of instructions: 110 | 111 | - FROM - defines a base for your image. exemple : FROM debian 112 | - RUN - executes any commands in a new layer on top of the current image and commits the result. RUN also has a shell form for running commands. 113 | - WORKDIR - sets the working directory for any RUN, CMD, ENTRYPOINT, COPY, and ADD instructions that follow it in the Dockerfile. (You go directly in the directory you choose) 114 | - COPY - copies new files or directories from and adds them to the filesystem of the container at the path . 115 | - CMD - lets you define the default program that is run once you start the container based on this image. Each Dockerfile only has one CMD, and only the last CMD instance is respected when multiple ones exist. 116 | 117 | ## How to launch a localhost webpage to test 118 | ### **(this point works only on the mac and not the VM)** 119 | ### [Watch this Video tutorial]() 120 | - Create a HTML file with some code in it. 121 | - Create you dockerfile 122 | - The image will be NGINX : FROM NGINX 123 | - Use COPY to copy your files into the html directory on NGINX 124 | - Use the command "docker build -t simple ." 125 | - Use the command "docker container run --name="nameofyourchoice" -d -p 9000:80 simple" 126 | - --name is to give a name to your image 127 | - -d run the container in background 128 | - -p publish the container's port to the host. In that case 9000 to 80 129 | 130 | # NGINX 131 | 132 | ## How to set up NGINX (our web server) 133 | - [Video tutorial]() 134 | Nginx is a webserver which stores hmtl, js, images files and use http request to display a website. 135 | Nginx conf documents will be used to config our server and the right proxy connexion. 136 | 137 | ## configure .conf file on nginx 138 | ### useful nginx links 139 | - [location explanations]() 140 | - [What is a proxy server]() 141 | - [All nginx definitions]() 142 | - [Nginx Command line]() 143 | - [PID 1 signal handling && nginx](https://cloud.google.com/architecture/best-practices-for-building-containers#signal-handling) 144 | - [What is TLS(in french)](https://fr.wikipedia.org/wiki/Transport_Layer_Security) 145 | 146 | ### Listen && Location 147 | - Listen will indicate to the server which request it has to accept: 148 | Listen can take ports and adresses : exemple Listen 80; 149 | - The location directive within NGINX server block allows to route request to correct location within the file system. 150 | The directive is used to tell NGINX where to look for a resource by including files and folders while matching a location block against an URL. 151 | 152 | ## Steps to add in localhost by configuring 153 | ### **(this point works only on the mac and not the VM)** 154 | 1. I added to my /var/www/ directory an index html file 155 | 2. I configured the default file in etc/nginx/site-enabled/default 156 | 3. I added a server bracket with a location to var/www/ in the doc. Save it and reload nginx with 'nginx -s reload'. 157 | 4. Because the port host I put when I built was 7000. Go to a web page and put: http://localhost:7000/. It works!!!! 158 | ![nginxLocalImage](images/nginxLocalImages.png) 159 | 160 | ## How to change your localhost by vbachele.42.fr 161 | 1. Go to the file /etc/hosts 162 | 2. Add the following line : "127.0.0.1 vbachele.42.fr" 163 | 164 | ## Fastcgi (or how to process PHP with nginx) 165 | ### Useful links 166 | - [What is http](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) 167 | - [difference between http && tcp](https://www.goanywhere.com/blog/http-vs-tcp-whats-the-difference#:~:text=TCP%20contains%20information%20about%20what,data%20in%20the%20stream%20contains.) 168 | - [PHP Fast CGI Examples](https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/) 169 | - [Why using fastcgi_pass 127.0.0.1:9000](https://serverfault.com/questions/1094793/what-is-this-nginx-location-for-php-fpm-fastcgi-pass-127-0-0-19000-really-doing) 170 | - [Install Nginx with php-fpm in video](https://www.youtube.com/watch?v=I_9-xWmkh28&ab_channel=ProgramWithGio) 171 | - [Fast CGI explanations commands](https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx) 172 | 173 | PHP-FPM (for fast-cgi Process Manager) runs as an isolated service when you use PHP-FPM. 174 | Employing this PHP version as the language interpreter means requests will be processed via a TCP/IP socket, 175 | and the Nginx server handles HTTP requests only, while PHP-FPM interprets the PHP code. Taking advantage of two separate services is vital to become more efficient. 176 | It features with Wordpress 177 | 178 | # Docker-compose 179 | - [tutorial open classroom dockercompose](https://openclassrooms.com/fr/courses/2035766-optimisez-votre-deploiement-en-creant-des-conteneurs-avec-docker/6211624-decouvrez-et-installez-docker-compose) 180 | 181 | ## Docker-Compose commands 182 | ```c 183 | - docker-compose up -d --build, //Create and build all the containers and they still run in the background 184 | - docker-compose ps, //Check the status for all the containers 185 | - docker-compose logs -f --tail 5, //see the first 5 lines of the logs of your containers 186 | - docker-compose stop , //stop a stack of your docker compose 187 | - Docker-compose down, //destroy all your ressources 188 | - docker-compose config, //check the syntax of you docker-compose file 189 | ``` 190 | 191 | ## Inside the docker-compose file 192 | All the information about what every line means are in this [tutorial](https://openclassrooms.com/fr/courses/2035766-optimisez-votre-deploiement-en-creant-des-conteneurs-avec-docker/6211677-creez-un-fichier-docker-compose-pour-orchestrer-vos-conteneurs) 193 | 194 | # WORDPRESS 195 | ## Useful links 196 | - [What is the wordpress CLI](https://www.dreamhost.com/wordpress/guide-to-wp-cli/#:~:text=The%20WP%2DCLI%20is%20a,faster%20using%20the%20WP%2DCLI.) 197 | - [Know more about wp-config.php](https://wpformation.com/wp-config-php-et-functions-php-fichiers-wordpress/) 198 | - [php-fpm - www.conf](https://myjeeva.com/php-fpm-configuration-101.html) 199 | 200 | *definitions* 201 | *wp-config.php* This file tells to your database how to get your files and how to treat them 202 | ## What are the steps to create your Wordpress 203 | 1. **Create you dockerfile image** 204 | - Download php-fpm 205 | - Copy the www.conf file in php/7.3/fpm/pool.d/ 206 | - Create the php directory to enable php-fpm to run 207 | - Copy the script and launch it 208 | - Go to the html directory 209 | - Launch php-fpm 210 | 211 | 2. **Create a script** 212 | - Download wordpress 213 | - Create the configuration file of wordpress 214 | - Move files from wordpress in the html directory 215 | - Give the 4th environmental variables for wordpress 216 | 217 | 3. **Create a www.conf** 218 | You need to edit www.conf and place it in /etc/php/7.3(the usual version of php on 42 vm)/fpm/pool.d and wp-content.php to disable access to the wordpress installation page when you access your site at https://login.42.fr 219 | - Put listen = 0.0.0.0:9000 to listen to all ports 220 | - Increase the number for the pm values in order to avoid a 502 page 221 | 222 | # MARIADB 223 | MariaDB will be the database to store information about our wordpress users and settings. 224 | In this section we have to create the Mariadb image and create 2 users. 225 | 226 | ## Useful links 227 | - [Import-export databases](https://www.interserver.net/tips/kb/import-export-databases-mysql-command-line/) 228 | - [Create and give permissions to a user](https://www.daniloaz.com/en/how-to-create-a-user-in-mysql-mariadb-and-grant-permissions-on-a-specific-database/) 229 | - [Why create /var/run/mysqld directory](http://cactogeek.free.fr/autres/DocumentationLinux-Windows/LinuxUbuntu/ProblemeMYSQL-mysqld.sockInexistant.pdf) 230 | - [How to give all privileges for a user on a database](https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/) 231 | - [How to import a data base](https://www.journaldunet.fr/web-tech/developpement/1202663-comment-importer-un-fichier-sql-dans-mysql-en-ligne-de-commande/) 232 | 233 | ## MARIADB useful commands 234 | ```c 235 | mysql -uroot // To connect on mysql CLI 236 | SELECT User FROM mysql.user; // To see all the users 237 | USE wordpress // To connect on your wordpress database 238 | mysqldump -u username -p databasename > filename.sql // To export the file 239 | mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE < /usr/local/bin/wordpress.sql // To import the file 240 | ``` 241 | 242 | ## What are the steps to create your own Maria DB image 243 | 1. **Create a dockerfile** 244 | - Download mariadb-server && mariadb-client 245 | - To run mariaDB on your container, you have to copy your .sh and the .sql on the /var/local/bin/ 246 | - Give the right to execute your mysqld (which is the daemon for mysql) 247 | - Launch your script to install mariaDB 248 | - Then do a CMD to enable the database to listen to all the IPV4 adresses. 249 | 250 | 2. **Create a script (.sh file)** 251 | - mysql_install_db initializes the MySQL data directory and creates the system tables that it contains, if they do not exist 252 | - In this script we downloaded Maria DB on the container, we have to install it and create the root user 253 | - Then we launch the commandline to give all the privileges to the root user. The function GRANT from mysqlcli (sql command line) gives access (or all access) to a user. 254 | 255 | 3. **Create your file.sql** 256 | - 2 options : 257 | 1. You create the database, the user and you give all privileges to the user 258 | as [malatini did](https://github.com/42cursus/inception/blob/validated/srcs/requirements/mariadb/config/create_db.sql) 259 | 2. You export your own wordpress.sql as I did (and Lea did !!!!) 260 | - Step 1: Create your admin user on wordpress: 261 | You might don't know what it is, no prob! It means you will export your admin user from your database in order to put it in your .sql file. 262 | - Go to your wordpress website (localhost:443) and create your user by using the same username and password as your .env file. 263 | - Step 2: Export your admin user.sql 264 | You have to go on your mariaDB container and do the following command 265 | - mysqldump -u 'username' -p 'databasename' > filename.sql *it will export your user on the filename.sql, please change username, databasename by what you put in your .env file* 266 | - You have a file called filename.sql in your current directory 267 | - "cat filename.sql" in your container and copy past to your .sql project. 268 | - Your .sql is ready now to be imported 269 | - Step 3: relaunch your docker-compose 270 | - TADA you will be directly in your website by passing the phase of installation 271 | ![Wordpress without installation](images/wordpress_page.png) 272 | 273 | ### Commands to check if all is working 274 | ```c 275 | SHOW DATABASES; // show the databes 276 | use 'wordpress'; // go in the wordpress databse 277 | SHOW TABLES; // show all the tables from the database you selected 278 | SELECT wp_users.display_name FROM wp_users; // display username from wordpress database 279 | SELECT * FROM wp_users; // select 280 | ``` 281 | 282 | # BONUS 283 | 284 | ## REDIS 285 | ### Useful links 286 | - [What is redis works with wordpress and what is a cache](https://www.section.io/engineering-education/how-to-set-up-and-configure-redis-caching-for-wordpress/) 287 | - [How to set up redis (english article)](https://www.vultr.com/docshow-to-setup-redis-caching-for-wordpress-with-ubuntu-20-04-and-nginx/) 288 | - [how to set up redis(french article)](https://gaelbillon.com/installer-et-configurer-redis-pour-wordpress-en-5-minutes/) 289 | 290 | ### Definition 291 | Remote Dictionary Server (Redis) is an in-memory, persistent, key-value database known as a data structure server. One important factor that differentiates Redis from similar servers is its ability to store and manipulate high-level data types (common examples include lists, maps, sets, and sorted sets). 292 | 293 | ### REDIS useful commands 294 | ```c 295 | redis-cli // to connect with the cli 296 | redis-server --protected-mode no // To set up redis when you launch your image 297 | ``` 298 | 299 | ### How to set up REDIS 300 | 1. **Create a dockerfile** 301 | - Install redis on it 302 | - Copy the .sh in your image 303 | - RUN the .sh 304 | 305 | 2. **Create a sheel script** 306 | *Redis by default has a redis.conf and we need to modify 3 values on it* 307 | - Modify the value on the .conf document with the sed function 308 | - Run the redis-server command to install it 309 | 310 | 3. **Modify the dockerfile of wordpress** 311 | - You need to DL the wp-cli and you need to move it it the app directory (/usr/bin/wordpress) 312 | - Add the installation of redis and php-redis 313 | 314 | 4. **Modify your script on wordpress file** 315 | *To do this, we can set directly information in the script for wordpress wpcli command* 316 | - Modify the wp-config.php file 317 | - Define the redis Host 318 | - Define the redis Port // To redirect wordpress port on this port 319 | - Define wp cache key salt 320 | - Define wp redis password 321 | - Define wp redis client 322 | - Install the redis-cache plugin, updates and enables it 323 | 324 | ### How to know your redis is installed on wordpress and running 325 | 1. **Check redis is properly installed on your redis image** 326 | - Launch the command 'redis-cli -h localhost' on your redis image, your should connect to your localhost. Then do ping and the answer should be PONG. Great your redis is installed. 327 | 328 | 2. **Check if the plugin is installed on wordpress** 329 | - Go to your wp-admin panel on wordpress : for me it is https://vbachele.42.fr 330 | - click on plugins on the left tab 331 | - If you see "Redis Object Cache", Congrats !, click on settings and you will see Status "Connected" in green 332 | 333 | ## FTP SERVER 334 | 335 | ### Useful links 336 | *This is the most difficult of the bonus to do* 337 | - [What is an FTP server?](https://titanftp.com/2022/07/05/what-is-an-ftp-server/) 338 | - [What is vstftpd](https://en.wikipedia.org/wiki/Vsftpd) 339 | - [Install an ftp server with wordpress](http://praveen.kumar.in/2009/05/31setting-up-ftps-using-vsftpd-for-wordpress-plugins-auto-upgrade/) 340 | - [Understand vstftpd.conf file (french version)](https://linux.developpez.com/vsftpd/) 341 | 342 | ### Definition 343 | An FTP Server, in the simplest of definitions, is a software application that enables the transfer of files from one computer to another. FTP (which stands for “File Transfer Protocol”) is a way to transfer files to any computer in the world that is connected to the Internet. For wordpress it allows to modify ealisy your files like the wordpress files or your code. 344 | 345 | ### How to set up your ftp server ? 346 | 1. **Create a dockerfile** 347 | - Download vsftpd (a ftp secure secure server) 348 | - Copy the .conf in your ftp image 349 | - Run your script to install ftp_server 350 | - Run your ftp_server 351 | 2. **Modify your docker-composer.yml** 352 | - Create your image as usual 353 | - Add the port 20 and 21 (port by default for ftp servers) 354 | - Put the same volumes as your wordpress && nginx 355 | 356 | 3. **Create a script to execute** 357 | *In this script we will create a user, give rights* 358 | - Create a user 359 | - give him the right to your www files 360 | 361 | 4. **Create .conf_file** 362 | *In this .conf you will have to configure your file to allow the localhost* 363 | 364 | ### How you know it works? 365 | I did the test on my macOS (should work everywhere), you have to download filezilla for exemple it is a ftp client which will communicate with our vsftpd server. Once installed as the image shows below, you should see the directory you put in your .conf file with the line *local_root=/var/www/html*. If you add a file in the /var/www/html directory from filezilla, you should be able to see it in you container nginx, wordpress or ftp-server. 366 | 367 | ![filezilla client](./images/ftp_server_filezilla.png) 368 | 369 | ## ADMINER 370 | 371 | ### Definition 372 | Replace phpMyAdmin with Adminer and you will get a tidier user interface, better support for MySQL features, higher performance and more security. 373 | 374 | ### How to set up adminer 375 | 1. **Create a dockerfile** 376 | - Download curl && php 377 | - Download the version of adminer 378 | - Move the adminer php file to the index.php file (located in var/www/html) 379 | - Add the user www-data 380 | - Move your conf file in the php-fpm.d directory 381 | 382 | 2. **Create a www.conf file** 383 | - You need to add the listen port (*in my case the 9000*) 384 | - Add the listen owner and listen group *(in my case : www-data)* 385 | 386 | 3. **Modify the nginx.conf file** 387 | - You need to add in your nginx.conf a rule to listen the adminer on the port 9000. 388 | - It will check if the index.php exist 389 | 390 | 4. **Modify your docker-compose.yml** 391 | - Create as usual a docker image adminer in your docker-compose 392 | 393 | ### How to know adminer is working? 394 | - You have to put : https://"your_website_name"/adminer *in my case https://vbachele.42.fr/adminer* 395 | - You should be redirect on the adminer connexion page 396 | 397 | ## Service of my choice 398 | ### Useful links 399 | - [What is hugo](https://gohugo.io/about/what-is-hugo/) 400 | - [How to set up hugo](https://gohugo.io/getting-started/quick-start/) 401 | - [Configure hugo (more explanations about .toml file)](https://gohugo.io/getting-started/configuration/#configure-build) 402 | ### Definition 403 | Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again. 404 | 405 | ### How to set up hugo? 406 | 1. **Modify the docker-compose file** 407 | 408 | 2. **Create a dockerfile** 409 | - Download hugo 410 | - Create and go the dedicate directory (for me the name is *me*) 411 | - Create your webiste and add your template 412 | - Copy your toml file to replace the one for your directory 413 | 414 | 3. **Add a config.toml file** 415 | - The toml file is used by hugo as a configuration file 416 | - You need to add the #baseURL with your url 417 | - Your need to add the theme your downloaded on the dockerfile for my case it is "m10c" 418 | 419 | 4. **Modify the .nginx file** 420 | - You have to add a rule to listen the dedicated directory 421 | - Add the rule for the proxy pass to listen your container 422 | - include the params for the proxy for nginx 423 | 424 | ### How to test your program? 425 | - You need to go on the URL you passed (my url is *https://vbachele.42.fr/me*) 426 | - If you see only a blank page, that means your theme is not applied it works but you need to find how to apply the theme. 427 | - If you see a page it works ! 428 | ![hugo_website](images/hugo.png) 429 | 430 | ## Static web page 431 | *For this one it is easy, I took the hugo services and I did the following changes.* 432 | 1. **Update the .toml file** 433 | - I changed the .toml file with my theme from the previous bonus to add a page about, presentation and my github link. 434 | 435 | 2. **Create a dockerfile** 436 | 437 | 3. **Update your docker-compose.yml** 438 | 439 | 4. **Update the .nginx conf file** 440 | - You need to update the .conf file to listen your new image in order to display the website. 441 | 442 | 4. **Create your static pages** 443 | - I created the about page in markdown 444 | - I created the presentation page in markdown 445 | 446 | **Here is the website** 447 | ![static web page](images/static_page.png) 448 | -------------------------------------------------------------------------------- /images/ftp_server_filezilla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/images/ftp_server_filezilla.png -------------------------------------------------------------------------------- /images/hugo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/images/hugo.png -------------------------------------------------------------------------------- /images/nginxLocalImages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/images/nginxLocalImages.png -------------------------------------------------------------------------------- /images/static_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/images/static_page.png -------------------------------------------------------------------------------- /images/wordpress_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/images/wordpress_page.png -------------------------------------------------------------------------------- /scrs/.env: -------------------------------------------------------------------------------- 1 | # 2 | DOMAIN_NAME=vbachele.42.fr 3 | 4 | MYSQL_HOSTNAME=mariadb 5 | MYSQL_DATABASE=wordpress 6 | MYSQL_USER=vbachele 7 | MYSQL_PASSWORD=new1234 8 | MYSQL_ROOT_PASSWORD=root4life 9 | 10 | ### Bonus part ### 11 | REDIS_PASSWORD =new1234 12 | FTP_USR=vbachele 13 | FTP_PWD=new1234 14 | USER_ID=1002 15 | GROUP_ID=1002 16 | ################## 17 | 18 | # -------------------------------------------------------------------------------- /scrs/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | nginx: 5 | container_name: nginx 6 | build: ./requirements/nginx 7 | depends_on: 8 | - adminer 9 | - redis 10 | - hugo 11 | ports: 12 | - 443:443 13 | volumes: 14 | - wordpress_data:/var/www/html 15 | restart: always 16 | networks: 17 | - network 18 | 19 | mariadb: 20 | container_name: mariadb 21 | build: ./requirements/mariadb 22 | #volumes allow to store in a persistent disk the content in a local disk 23 | #db_data is a volume created by docker directly 24 | volumes: 25 | - mariadb_data:/var/lib/mysql 26 | # in case of problem we restart automatically the container 27 | networks: 28 | - network 29 | restart: always 30 | env_file: 31 | - .env 32 | 33 | wordpress: 34 | container_name: wordpress 35 | #Create a depedency between the 2 container, db will be launched before 36 | depends_on: 37 | - mariadb 38 | build: 39 | context: ./requirements/wordpress 40 | dockerfile: Dockerfile 41 | restart: always 42 | env_file: 43 | - .env 44 | volumes: 45 | - wordpress_data:/var/www/html 46 | networks: 47 | - network 48 | 49 | #BONUS PART 50 | redis: 51 | container_name: redis 52 | build: ./requirements/bonus/redis 53 | depends_on: 54 | - wordpress 55 | ports: 56 | - '6379:6379' 57 | restart: always 58 | env_file: 59 | - .env 60 | volumes: 61 | - wordpress_data:/var/www/html 62 | networks: 63 | - network 64 | 65 | ftp-server: 66 | build: requirements/bonus/ftp_server 67 | container_name: ftp-server 68 | ports: 69 | - "21:21" 70 | - "21100-21110:21100-21110" 71 | volumes: 72 | - "wordpress_data:/var/www/html" 73 | networks: 74 | - network 75 | restart: always 76 | environment: 77 | FTP_USR: ${FTP_USR} 78 | FTP_PWD: ${FTP_PWD} 79 | 80 | adminer: 81 | build: ./requirements/bonus/adminer 82 | restart: always 83 | depends_on: 84 | - mariadb 85 | expose: 86 | - "9000" 87 | networks: 88 | - network 89 | 90 | hugo: 91 | container_name: hugo 92 | build: ./requirements/bonus/hugo 93 | restart: always 94 | networks: 95 | - network 96 | 97 | static_page: 98 | container_name: static_page 99 | build: ./requirements/bonus/static_page 100 | restart: always 101 | networks: 102 | - network 103 | 104 | volumes: 105 | mariadb_data: 106 | driver: local 107 | driver_opts: 108 | type: none 109 | device: /home/vbachele/data/mysql 110 | o: bind 111 | wordpress_data: 112 | driver: local 113 | driver_opts: 114 | type: none 115 | device: /home/vbachele/data/wordpress 116 | o: bind 117 | 118 | networks: 119 | network: 120 | driver: bridge -------------------------------------------------------------------------------- /scrs/requirements/bonus/adminer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.15.0 2 | 3 | # install prerequisites 4 | # https://wordpress.com/support/php-environment/ 5 | RUN apk update && \ 6 | apk add --no-cache \ 7 | curl \ 8 | less \ 9 | mariadb-client \ 10 | php8 \ 11 | php8-fpm \ 12 | php8-common \ 13 | php8-session \ 14 | php8-iconv \ 15 | php8-json \ 16 | php8-gd \ 17 | php8-curl \ 18 | php8-xml \ 19 | php8-mysqli \ 20 | php8-imap \ 21 | php8-pdo \ 22 | php8-pdo_mysql \ 23 | php8-soap \ 24 | php8-posix \ 25 | php8-gettext \ 26 | php8-ldap \ 27 | php8-ctype \ 28 | php8-dom \ 29 | php8-simplexml 30 | 31 | #RUN the adminer part, create html directory, move the adminer directory and add user 32 | 33 | RUN \ 34 | curl -L -O https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php && \ 35 | mkdir -p /var/www/html && \ 36 | mv ./adminer-4.8.1.php /var/www/html/index.php && \ 37 | adduser -u 82 -D -S -G www-data www-data 38 | 39 | COPY /conf/www.conf /etc/php8/php-fpm.d/www.conf 40 | 41 | EXPOSE 9000 42 | STOPSIGNAL SIGQUIT 43 | 44 | CMD ["php-fpm8", "--nodaemonize"] -------------------------------------------------------------------------------- /scrs/requirements/bonus/adminer/conf/www.conf: -------------------------------------------------------------------------------- 1 | ; Start a new pool named 'www'. 2 | ; the variable $pool can be used in any directive and will be replaced by the 3 | ; pool name ('www' here) 4 | [www] 5 | 6 | ; Per pool prefix 7 | ; It only applies on the following directives: 8 | ; - 'access.log' 9 | ; - 'slowlog' 10 | ; - 'listen' (unixsocket) 11 | ; - 'chroot' 12 | ; - 'chdir' 13 | ; - 'php_values' 14 | ; - 'php_admin_values' 15 | ; When not set, the global prefix (or /usr) applies instead. 16 | ; Note: This directive can also be relative to the global prefix. 17 | ; Default Value: none 18 | ;prefix = /path/to/pools/$pool 19 | 20 | ; Unix user/group of processes 21 | ; Note: The user is mandatory. If the group is not set, the default user's group 22 | ; will be used. 23 | user = www-data 24 | group = www-data 25 | 26 | ; The address on which to accept FastCGI requests. 27 | ; Valid syntaxes are: 28 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on 29 | ; a specific port; 30 | ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on 31 | ; a specific port; 32 | ; 'port' - to listen on a TCP socket to all addresses 33 | ; (IPv6 and IPv4-mapped) on a specific port; 34 | ; '/path/to/unix/socket' - to listen on a unix socket. 35 | ; Note: This value is mandatory. 36 | listen = 9000 37 | 38 | ; Set listen(2) backlog. 39 | ; Default Value: 511 (-1 on FreeBSD and OpenBSD) 40 | ;listen.backlog = 511 41 | 42 | ; Set permissions for unix socket, if one is used. In Linux, read/write 43 | ; permissions must be set in order to allow connections from a web server. Many 44 | ; BSD-derived systems allow connections regardless of permissions. The owner 45 | ; and group can be specified either by name or by their numeric IDs. 46 | ; Default Values: user and group are set as the running user 47 | ; mode is set to 0660 48 | listen.owner = www-data 49 | listen.group = www-data 50 | listen.mode = 0660 51 | ; When POSIX Access Control Lists are supported you can set them using 52 | ; these options, value is a comma separated list of user/group names. 53 | ; When set, listen.owner and listen.group are ignored 54 | ;listen.acl_users = 55 | ;listen.acl_groups = 56 | 57 | ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. 58 | ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original 59 | ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address 60 | ; must be separated by a comma. If this value is left blank, connections will be 61 | ; accepted from any ip address. 62 | ; Default Value: any 63 | ;listen.allowed_clients = 127.0.0.1 64 | 65 | ; Specify the nice(2) priority to apply to the pool processes (only if set) 66 | ; The value can vary from -19 (highest priority) to 20 (lower priority) 67 | ; Note: - It will only work if the FPM master process is launched as root 68 | ; - The pool processes will inherit the master process priority 69 | ; unless it specified otherwise 70 | ; Default Value: no set 71 | ; process.priority = -19 72 | 73 | ; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user 74 | ; or group is different than the master process user. It allows to create process 75 | ; core dump and ptrace the process for the pool user. 76 | ; Default Value: no 77 | ; process.dumpable = yes 78 | 79 | ; Choose how the process manager will control the number of child processes. 80 | ; Possible Values: 81 | ; static - a fixed number (pm.max_children) of child processes; 82 | ; dynamic - the number of child processes are set dynamically based on the 83 | ; following directives. With this process management, there will be 84 | ; always at least 1 children. 85 | ; pm.max_children - the maximum number of children that can 86 | ; be alive at the same time. 87 | ; pm.start_servers - the number of children created on startup. 88 | ; pm.min_spare_servers - the minimum number of children in 'idle' 89 | ; state (waiting to process). If the number 90 | ; of 'idle' processes is less than this 91 | ; number then some children will be created. 92 | ; pm.max_spare_servers - the maximum number of children in 'idle' 93 | ; state (waiting to process). If the number 94 | ; of 'idle' processes is greater than this 95 | ; number then some children will be killed. 96 | ; ondemand - no children are created at startup. Children will be forked when 97 | ; new requests will connect. The following parameter are used: 98 | ; pm.max_children - the maximum number of children that 99 | ; can be alive at the same time. 100 | ; pm.process_idle_timeout - The number of seconds after which 101 | ; an idle process will be killed. 102 | ; Note: This value is mandatory. 103 | pm = dynamic 104 | 105 | ; The number of child processes to be created when pm is set to 'static' and the 106 | ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. 107 | ; This value sets the limit on the number of simultaneous requests that will be 108 | ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. 109 | ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP 110 | ; CGI. The below defaults are based on a server without much resources. Don't 111 | ; forget to tweak pm.* to fit your needs. 112 | ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' 113 | ; Note: This value is mandatory. 114 | pm.max_children = 5 115 | 116 | ; The number of child processes created on startup. 117 | ; Note: Used only when pm is set to 'dynamic' 118 | ; Default Value: (min_spare_servers + max_spare_servers) / 2 119 | pm.start_servers = 2 120 | 121 | ; The desired minimum number of idle server processes. 122 | ; Note: Used only when pm is set to 'dynamic' 123 | ; Note: Mandatory when pm is set to 'dynamic' 124 | pm.min_spare_servers = 1 125 | 126 | ; The desired maximum number of idle server processes. 127 | ; Note: Used only when pm is set to 'dynamic' 128 | ; Note: Mandatory when pm is set to 'dynamic' 129 | pm.max_spare_servers = 3 130 | 131 | ; The number of seconds after which an idle process will be killed. 132 | ; Note: Used only when pm is set to 'ondemand' 133 | ; Default Value: 10s 134 | ;pm.process_idle_timeout = 10s; 135 | 136 | ; The number of requests each child process should execute before respawning. 137 | ; This can be useful to work around memory leaks in 3rd party libraries. For 138 | ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. 139 | ; Default Value: 0 140 | ;pm.max_requests = 500 141 | 142 | ; The URI to view the FPM status page. If this value is not set, no URI will be 143 | ; recognized as a status page. It shows the following information: 144 | ; pool - the name of the pool; 145 | ; process manager - static, dynamic or ondemand; 146 | ; start time - the date and time FPM has started; 147 | ; start since - number of seconds since FPM has started; 148 | ; accepted conn - the number of request accepted by the pool; 149 | ; listen queue - the number of request in the queue of pending 150 | ; connections (see backlog in listen(2)); 151 | ; max listen queue - the maximum number of requests in the queue 152 | ; of pending connections since FPM has started; 153 | ; listen queue len - the size of the socket queue of pending connections; 154 | ; idle processes - the number of idle processes; 155 | ; active processes - the number of active processes; 156 | ; total processes - the number of idle + active processes; 157 | ; max active processes - the maximum number of active processes since FPM 158 | ; has started; 159 | ; max children reached - number of times, the process limit has been reached, 160 | ; when pm tries to start more children (works only for 161 | ; pm 'dynamic' and 'ondemand'); 162 | ; Value are updated in real time. 163 | ; Example output: 164 | ; pool: www 165 | ; process manager: static 166 | ; start time: 01/Jul/2011:17:53:49 +0200 167 | ; start since: 62636 168 | ; accepted conn: 190460 169 | ; listen queue: 0 170 | ; max listen queue: 1 171 | ; listen queue len: 42 172 | ; idle processes: 4 173 | ; active processes: 11 174 | ; total processes: 15 175 | ; max active processes: 12 176 | ; max children reached: 0 177 | ; 178 | ; By default the status page output is formatted as text/plain. Passing either 179 | ; 'html', 'xml' or 'json' in the query string will return the corresponding 180 | ; output syntax. Example: 181 | ; http://www.foo.bar/status 182 | ; http://www.foo.bar/status?json 183 | ; http://www.foo.bar/status?html 184 | ; http://www.foo.bar/status?xml 185 | ; 186 | ; By default the status page only outputs short status. Passing 'full' in the 187 | ; query string will also return status for each pool process. 188 | ; Example: 189 | ; http://www.foo.bar/status?full 190 | ; http://www.foo.bar/status?json&full 191 | ; http://www.foo.bar/status?html&full 192 | ; http://www.foo.bar/status?xml&full 193 | ; The Full status returns for each process: 194 | ; pid - the PID of the process; 195 | ; state - the state of the process (Idle, Running, ...); 196 | ; start time - the date and time the process has started; 197 | ; start since - the number of seconds since the process has started; 198 | ; requests - the number of requests the process has served; 199 | ; request duration - the duration in µs of the requests; 200 | ; request method - the request method (GET, POST, ...); 201 | ; request URI - the request URI with the query string; 202 | ; content length - the content length of the request (only with POST); 203 | ; user - the user (PHP_AUTH_USER) (or '-' if not set); 204 | ; script - the main script called (or '-' if not set); 205 | ; last request cpu - the %cpu the last request consumed 206 | ; it's always 0 if the process is not in Idle state 207 | ; because CPU calculation is done when the request 208 | ; processing has terminated; 209 | ; last request memory - the max amount of memory the last request consumed 210 | ; it's always 0 if the process is not in Idle state 211 | ; because memory calculation is done when the request 212 | ; processing has terminated; 213 | ; If the process is in Idle state, then informations are related to the 214 | ; last request the process has served. Otherwise informations are related to 215 | ; the current request being served. 216 | ; Example output: 217 | ; ************************ 218 | ; pid: 31330 219 | ; state: Running 220 | ; start time: 01/Jul/2011:17:53:49 +0200 221 | ; start since: 63087 222 | ; requests: 12808 223 | ; request duration: 1250261 224 | ; request method: GET 225 | ; request URI: /test_mem.php?N=10000 226 | ; content length: 0 227 | ; user: - 228 | ; script: /home/fat/web/docs/php/test_mem.php 229 | ; last request cpu: 0.00 230 | ; last request memory: 0 231 | ; 232 | ; Note: There is a real-time FPM status monitoring sample web page available 233 | ; It's available in: /usr/share/php8/fpm/status.html 234 | ; 235 | ; Note: The value must start with a leading slash (/). The value can be 236 | ; anything, but it may not be a good idea to use the .php extension or it 237 | ; may conflict with a real PHP file. 238 | ; Default Value: not set 239 | ;pm.status_path = /status 240 | 241 | ; The address on which to accept FastCGI status request. This creates a new 242 | ; invisible pool that can handle requests independently. This is useful 243 | ; if the main pool is busy with long running requests because it is still possible 244 | ; to get the status before finishing the long running requests. 245 | ; 246 | ; Valid syntaxes are: 247 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on 248 | ; a specific port; 249 | ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on 250 | ; a specific port; 251 | ; 'port' - to listen on a TCP socket to all addresses 252 | ; (IPv6 and IPv4-mapped) on a specific port; 253 | ; '/path/to/unix/socket' - to listen on a unix socket. 254 | ; Default Value: value of the listen option 255 | ;pm.status_listen = 127.0.0.1:9001 256 | 257 | ; The ping URI to call the monitoring page of FPM. If this value is not set, no 258 | ; URI will be recognized as a ping page. This could be used to test from outside 259 | ; that FPM is alive and responding, or to 260 | ; - create a graph of FPM availability (rrd or such); 261 | ; - remove a server from a group if it is not responding (load balancing); 262 | ; - trigger alerts for the operating team (24/7). 263 | ; Note: The value must start with a leading slash (/). The value can be 264 | ; anything, but it may not be a good idea to use the .php extension or it 265 | ; may conflict with a real PHP file. 266 | ; Default Value: not set 267 | ;ping.path = /ping 268 | 269 | ; This directive may be used to customize the response of a ping request. The 270 | ; response is formatted as text/plain with a 200 response code. 271 | ; Default Value: pong 272 | ;ping.response = pong 273 | 274 | ; The access log file 275 | ; Default: not set 276 | ;access.log = log/php8/$pool.access.log 277 | 278 | ; The access log format. 279 | ; The following syntax is allowed 280 | ; %%: the '%' character 281 | ; %C: %CPU used by the request 282 | ; it can accept the following format: 283 | ; - %{user}C for user CPU only 284 | ; - %{system}C for system CPU only 285 | ; - %{total}C for user + system CPU (default) 286 | ; %d: time taken to serve the request 287 | ; it can accept the following format: 288 | ; - %{seconds}d (default) 289 | ; - %{milliseconds}d 290 | ; - %{mili}d 291 | ; - %{microseconds}d 292 | ; - %{micro}d 293 | ; %e: an environment variable (same as $_ENV or $_SERVER) 294 | ; it must be associated with embraces to specify the name of the env 295 | ; variable. Some examples: 296 | ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e 297 | ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e 298 | ; %f: script filename 299 | ; %l: content-length of the request (for POST request only) 300 | ; %m: request method 301 | ; %M: peak of memory allocated by PHP 302 | ; it can accept the following format: 303 | ; - %{bytes}M (default) 304 | ; - %{kilobytes}M 305 | ; - %{kilo}M 306 | ; - %{megabytes}M 307 | ; - %{mega}M 308 | ; %n: pool name 309 | ; %o: output header 310 | ; it must be associated with embraces to specify the name of the header: 311 | ; - %{Content-Type}o 312 | ; - %{X-Powered-By}o 313 | ; - %{Transfert-Encoding}o 314 | ; - .... 315 | ; %p: PID of the child that serviced the request 316 | ; %P: PID of the parent of the child that serviced the request 317 | ; %q: the query string 318 | ; %Q: the '?' character if query string exists 319 | ; %r: the request URI (without the query string, see %q and %Q) 320 | ; %R: remote IP address 321 | ; %s: status (response code) 322 | ; %t: server time the request was received 323 | ; it can accept a strftime(3) format: 324 | ; %d/%b/%Y:%H:%M:%S %z (default) 325 | ; The strftime(3) format must be encapsuled in a %{}t tag 326 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 327 | ; %T: time the log has been written (the request has finished) 328 | ; it can accept a strftime(3) format: 329 | ; %d/%b/%Y:%H:%M:%S %z (default) 330 | ; The strftime(3) format must be encapsuled in a %{}t tag 331 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 332 | ; %u: remote user 333 | ; 334 | ; Default: "%R - %u %t \"%m %r\" %s" 335 | ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" 336 | 337 | ; The log file for slow requests 338 | ; Default Value: not set 339 | ; Note: slowlog is mandatory if request_slowlog_timeout is set 340 | ;slowlog = log/php8/$pool.slow.log 341 | 342 | ; The timeout for serving a single request after which a PHP backtrace will be 343 | ; dumped to the 'slowlog' file. A value of '0s' means 'off'. 344 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 345 | ; Default Value: 0 346 | ;request_slowlog_timeout = 0 347 | 348 | ; Depth of slow log stack trace. 349 | ; Default Value: 20 350 | ;request_slowlog_trace_depth = 20 351 | 352 | ; The timeout for serving a single request after which the worker process will 353 | ; be killed. This option should be used when the 'max_execution_time' ini option 354 | ; does not stop script execution for some reason. A value of '0' means 'off'. 355 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 356 | ; Default Value: 0 357 | ;request_terminate_timeout = 0 358 | 359 | ; The timeout set by 'request_terminate_timeout' ini option is not engaged after 360 | ; application calls 'fastcgi_finish_request' or when application has finished and 361 | ; shutdown functions are being called (registered via register_shutdown_function). 362 | ; This option will enable timeout limit to be applied unconditionally 363 | ; even in such cases. 364 | ; Default Value: no 365 | ;request_terminate_timeout_track_finished = no 366 | 367 | ; Set open file descriptor rlimit. 368 | ; Default Value: system defined value 369 | ;rlimit_files = 1024 370 | 371 | ; Set max core size rlimit. 372 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 373 | ; Default Value: system defined value 374 | ;rlimit_core = 0 375 | 376 | ; Chroot to this directory at the start. This value must be defined as an 377 | ; absolute path. When this value is not set, chroot is not used. 378 | ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one 379 | ; of its subdirectories. If the pool prefix is not set, the global prefix 380 | ; will be used instead. 381 | ; Note: chrooting is a great security feature and should be used whenever 382 | ; possible. However, all PHP paths will be relative to the chroot 383 | ; (error_log, sessions.save_path, ...). 384 | ; Default Value: not set 385 | ;chroot = 386 | 387 | ; Chdir to this directory at the start. 388 | ; Note: relative path can be used. 389 | ; Default Value: current directory or / when chroot 390 | ;chdir = /var/www 391 | 392 | ; Redirect worker stdout and stderr into main error log. If not set, stdout and 393 | ; stderr will be redirected to /dev/null according to FastCGI specs. 394 | ; Note: on highloaded environment, this can cause some delay in the page 395 | ; process time (several ms). 396 | ; Default Value: no 397 | ;catch_workers_output = yes 398 | 399 | ; Decorate worker output with prefix and suffix containing information about 400 | ; the child that writes to the log and if stdout or stderr is used as well as 401 | ; log level and time. This options is used only if catch_workers_output is yes. 402 | ; Settings to "no" will output data as written to the stdout or stderr. 403 | ; Default value: yes 404 | ;decorate_workers_output = no 405 | 406 | ; Clear environment in FPM workers 407 | ; Prevents arbitrary environment variables from reaching FPM worker processes 408 | ; by clearing the environment in workers before env vars specified in this 409 | ; pool configuration are added. 410 | ; Setting to "no" will make all environment variables available to PHP code 411 | ; via getenv(), $_ENV and $_SERVER. 412 | ; Default Value: yes 413 | ;clear_env = no 414 | 415 | ; Limits the extensions of the main script FPM will allow to parse. This can 416 | ; prevent configuration mistakes on the web server side. You should only limit 417 | ; FPM to .php extensions to prevent malicious users to use other extensions to 418 | ; execute php code. 419 | ; Note: set an empty value to allow all extensions. 420 | ; Default Value: .php 421 | ;security.limit_extensions = .php .php3 .php4 .php5 .php7 422 | 423 | ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from 424 | ; the current environment. 425 | ; Default Value: clean env 426 | ;env[HOSTNAME] = $HOSTNAME 427 | ;env[PATH] = /usr/local/bin:/usr/bin:/bin 428 | ;env[TMP] = /tmp 429 | ;env[TMPDIR] = /tmp 430 | ;env[TEMP] = /tmp 431 | 432 | ; Additional php.ini defines, specific to this pool of workers. These settings 433 | ; overwrite the values previously defined in the php.ini. The directives are the 434 | ; same as the PHP SAPI: 435 | ; php_value/php_flag - you can set classic ini defines which can 436 | ; be overwritten from PHP call 'ini_set'. 437 | ; php_admin_value/php_admin_flag - these directives won't be overwritten by 438 | ; PHP call 'ini_set' 439 | ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. 440 | 441 | ; Defining 'extension' will load the corresponding shared extension from 442 | ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not 443 | ; overwrite previously defined php.ini values, but will append the new value 444 | ; instead. 445 | 446 | ; Note: path INI options can be relative and will be expanded with the prefix 447 | ; (pool, global or /usr) 448 | 449 | ; Default Value: nothing is defined by default except the values in php.ini and 450 | ; specified at startup with the -d argument 451 | ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com 452 | ;php_flag[display_errors] = off 453 | ;php_admin_value[error_log] = /var/log/php8/$pool.error.log 454 | ;php_admin_flag[log_errors] = on 455 | ;php_admin_value[memory_limit] = 32M -------------------------------------------------------------------------------- /scrs/requirements/bonus/ftp_server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.13 2 | 3 | RUN apk update && apk upgrade && apk add --no-cache \ 4 | vsftpd 5 | 6 | COPY conf/vsftpd.conf /tmp/vsftpd.conf 7 | 8 | COPY tools/server_ftp.sh /tmp/server_ftp.sh 9 | ENTRYPOINT ["sh", "/tmp/server_ftp.sh"] 10 | -------------------------------------------------------------------------------- /scrs/requirements/bonus/ftp_server/conf/vsftpd.conf: -------------------------------------------------------------------------------- 1 | # Example config file /etc/vsftpd.conf 2 | # 3 | # The default compiled in settings are fairly paranoid. This sample file 4 | # loosens things up a bit, to make the ftp daemon more usable. 5 | # Please see vsftpd.conf.5 for all compiled in defaults. 6 | # 7 | # READ THIS: This example file is NOT an exhaustive list of vsftpd options. 8 | # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's 9 | # capabilities. 10 | # 11 | # Allow anonymous FTP? (Beware - allowed by default if you comment this out). 12 | anonymous_enable=YES 13 | # 14 | # Uncomment this to allow local users to log in. 15 | local_enable=YES 16 | # 17 | # Uncomment this to enable any form of FTP write command. 18 | write_enable=YES 19 | # 20 | # Default umask for local users is 077. You may wish to change this to 022, 21 | # if your users expect that (022 is used by most other ftpd's) 22 | #local_umask=022 23 | # 24 | # Uncomment this to allow the anonymous FTP user to upload files. This only 25 | # has an effect if the above global write enable is activated. Also, you will 26 | # obviously need to create a directory writable by the FTP user. 27 | #anon_upload_enable=YES 28 | # 29 | # Uncomment this if you want the anonymous FTP user to be able to create 30 | # new directories. 31 | #anon_mkdir_write_enable=YES 32 | # 33 | # Activate directory messages - messages given to remote users when they 34 | # go into a certain directory. 35 | dirmessage_enable=YES 36 | # 37 | # Activate logging of uploads/downloads. 38 | xferlog_enable=YES 39 | # 40 | # Make sure PORT transfer connections originate from port 20 (ftp-data). 41 | connect_from_port_20=YES 42 | # 43 | # If you want, you can arrange for uploaded anonymous files to be owned by 44 | # a different user. Note! Using "root" for uploaded files is not 45 | # recommended! 46 | #chown_uploads=YES 47 | #chown_username=whoever 48 | # 49 | # You may override where the log file goes if you like. The default is shown 50 | # below. 51 | #xferlog_file=/var/log/vsftpd.log 52 | # 53 | # If you want, you can have your log file in standard ftpd xferlog format. 54 | # Note that the default log file location is /var/log/xferlog in this case. 55 | #xferlog_std_format=YES 56 | # 57 | # You may change the default value for timing out an idle session. 58 | #idle_session_timeout=600 59 | # 60 | # You may change the default value for timing out a data connection. 61 | #data_connection_timeout=120 62 | # 63 | # It is recommended that you define on your system a unique user which the 64 | # ftp server can use as a totally isolated and unprivileged user. 65 | #nopriv_user=ftpsecure 66 | # 67 | # Enable this and the server will recognise asynchronous ABOR requests. Not 68 | # recommended for security (the code is non-trivial). Not enabling it, 69 | # however, may confuse older FTP clients. 70 | #async_abor_enable=YES 71 | # 72 | # By default the server will pretend to allow ASCII mode but in fact ignore 73 | # the request. Turn on the below options to have the server actually do ASCII 74 | # mangling on files when in ASCII mode. 75 | # Beware that on some FTP servers, ASCII support allows a denial of service 76 | # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd 77 | # predicted this attack and has always been safe, reporting the size of the 78 | # raw file. 79 | # ASCII mangling is a horrible feature of the protocol. 80 | #ascii_upload_enable=YES 81 | #ascii_download_enable=YES 82 | # 83 | # You may fully customise the login banner string: 84 | ftpd_banner=Welcome to FTP server of inception! 85 | # 86 | # You may specify a file of disallowed anonymous e-mail addresses. Apparently 87 | # useful for combatting certain DoS attacks. 88 | #deny_email_enable=YES 89 | # (default follows) 90 | #banned_email_file=/etc/vsftpd.banned_emails 91 | # 92 | # You may specify an explicit list of local users to chroot() to their home 93 | # directory. If chroot_local_user is YES, then this list becomes a list of 94 | # users to NOT chroot(). 95 | # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that 96 | # the user does not have write access to the top level directory within the 97 | # chroot) 98 | chroot_local_user=YES 99 | allow_writeable_chroot=YES 100 | user_sub_token=$USER 101 | local_root=/var/www/html 102 | 103 | #chroot_list_enable=YES 104 | # (default follows) 105 | #chroot_list_file=/etc/vsftpd.chroot_list 106 | # 107 | # You may activate the "-R" option to the builtin ls. This is disabled by 108 | # default to avoid remote users being able to cause excessive I/O on large 109 | # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume 110 | # the presence of the "-R" option, so there is a strong case for enabling it. 111 | #ls_recurse_enable=YES 112 | # 113 | # When "listen" directive is enabled, vsftpd runs in standalone mode and 114 | # listens on IPv4 sockets. This directive cannot be used in conjunction 115 | # with the listen_ipv6 directive. 116 | listen=YES 117 | listen_port=21 118 | listen_address=0.0.0.0 119 | seccomp_sandbox=NO 120 | 121 | # 122 | # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6 123 | # sockets, you must run two copies of vsftpd with two configuration files. 124 | # Make sure, that one of the listen options is commented !! 125 | #listen_ipv6=YES 126 | 127 | pasv_enable=YES 128 | pasv_min_port=21100 129 | pasv_max_port=21110 130 | 131 | userlist_enable=YES 132 | userlist_file=/etc/vsftpd.userlist 133 | userlist_deny=NO -------------------------------------------------------------------------------- /scrs/requirements/bonus/ftp_server/tools/server_ftp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/vsftpd/vsftpd.conf.bak" ]; then 4 | 5 | mkdir -p /var/www/html 6 | 7 | cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak 8 | mv /tmp/vsftpd.conf /etc/vsftpd/vsftpd.conf 9 | 10 | # Add the FTP_USER, change his password and declare him as the owner of wordpress folder and all subfolders 11 | adduser $FTP_USR --disabled-password 12 | echo "$FTP_USR:$FTP_PWD" | /usr/sbin/chpasswd &> /dev/null 13 | chown -R $FTP_USR:$FTP_USR /var/www/html 14 | 15 | #chmod +x /etc/vsftpd/vsftpd.conf 16 | echo $FTP_USR | tee -a /etc/vsftpd.userlist &> /dev/null 17 | 18 | fi 19 | 20 | echo "FTP started on :21" 21 | /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf -------------------------------------------------------------------------------- /scrs/requirements/bonus/hugo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.15 2 | 3 | WORKDIR /var/hugo/me 4 | 5 | RUN apk update && apk upgrade && apk add --update --no-cache \ 6 | hugo \ 7 | git \ 8 | shadow \ 9 | && rm -f /var/cache/apk/* 10 | # create new hugo site 11 | RUN hugo new site /var/hugo/me \ 12 | && cd /var/hugo/me \ 13 | && git clone https://github.com/vaga/hugo-theme-m10c themes/m10c \ 14 | && hugo -b https://vbachele.42.fr/me 15 | 16 | COPY ./conf/config.toml /var/hugo/me/config.toml 17 | COPY conf/avatar.jpg /var/hugo/me/themes/m10c/static/avatar.jpg 18 | 19 | EXPOSE 1313 20 | 21 | CMD ["hugo", "server", \ 22 | "--bind=0.0.0.0", \ 23 | "--baseURL=https://vbachele.42.fr/me", \ 24 | "-p", "1313", \ 25 | "--logFile=/dev/stdout", \ 26 | "--appendPort=false"] -------------------------------------------------------------------------------- /scrs/requirements/bonus/hugo/conf/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/scrs/requirements/bonus/hugo/conf/avatar.jpg -------------------------------------------------------------------------------- /scrs/requirements/bonus/hugo/conf/config.toml: -------------------------------------------------------------------------------- 1 | #baseURL = "https://vbachele.42.fr/me" 2 | theme = "m10c" 3 | paginate = 8 4 | canonifyURLs = true 5 | 6 | [params] 7 | author = "Vincent Bachelet" 8 | description = "Dedicated hugo service for inception project" -------------------------------------------------------------------------------- /scrs/requirements/bonus/redis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y redis \ 5 | && rm -rf /var/lib/apt/lists/* 6 | 7 | COPY ./tools/redis.sh /tmp/redis.sh 8 | 9 | EXPOSE 6379 10 | 11 | CMD ["sh", "/tmp/redis.sh"] -------------------------------------------------------------------------------- /scrs/requirements/bonus/redis/tools/redis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/redis/redis.conf.bak" ]; then 4 | 5 | cp /etc//redis/redis.conf /etc/redis/redis.conf.bak #We create the .bak to notify the program if it exists, don't go to the loop anymore 6 | 7 | sed -i "s|bind 127.0.0.1|#bind 127.0.0.1|g" /etc/redis/redis.conf 8 | # sed -i "s|# requirepass foobared|requirepass $REDIS_PWD|g" /etc/redis.conf 9 | sed -i "s|# maxmemory |maxmemory 2mb|g" /etc/redis/redis.conf 10 | sed -i "s|# maxmemory-policy noeviction|maxmemory-policy allkeys-lru|g" /etc/redis/redis.conf 11 | 12 | fi 13 | 14 | redis-server --protected-mode no -------------------------------------------------------------------------------- /scrs/requirements/bonus/static_page/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.15 2 | 3 | WORKDIR /var/hugo/static 4 | 5 | RUN apk update && apk upgrade && apk add --update --no-cache \ 6 | hugo \ 7 | git \ 8 | shadow \ 9 | && rm -f /var/cache/apk/* 10 | # create new hugo site 11 | RUN hugo new site /var/hugo/static \ 12 | && cd /var/hugo/static \ 13 | && git clone https://github.com/vaga/hugo-theme-m10c themes/m10c \ 14 | && hugo new posts/presentation.md \ 15 | && hugo -b https://vbachele.42.fr/static \ 16 | && mkdir -p /var/hugo/me/content/about 17 | 18 | COPY ./conf/config.toml /var/hugo/static/config.toml 19 | COPY conf/presentation.md /var/hugo/static/content/posts/presentation.md 20 | COPY conf/about.md /var/hugo/static/content/about/index.md 21 | COPY conf/avatar.jpg /var/hugo/static/themes/m10c/static/avatar.jpg 22 | COPY conf/42fitness.jpg /var/hugo/static/themes/m10c/static/42fitness.jpg 23 | 24 | EXPOSE 1313 25 | 26 | CMD ["hugo", "server", \ 27 | "--bind=0.0.0.0", \ 28 | "--baseURL=https://vbachele.42.fr/static", \ 29 | "-p", "1313", \ 30 | "--logFile=/dev/stdout", \ 31 | "--appendPort=false"] -------------------------------------------------------------------------------- /scrs/requirements/bonus/static_page/conf/42fitness.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/scrs/requirements/bonus/static_page/conf/42fitness.jpg -------------------------------------------------------------------------------- /scrs/requirements/bonus/static_page/conf/about.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "About" 3 | +++ 4 | 5 | Hello, my name is Vincent and I am a student developer for 42 school. This page is for a bonus for the project 42_inception. We had to choose a new service to install. I choosed "hugo" which allows to create easily website with an open source static website generator. -------------------------------------------------------------------------------- /scrs/requirements/bonus/static_page/conf/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbachele/Inception/627913ace0da0e42febe5bcf3003c6f17fe5d429/scrs/requirements/bonus/static_page/conf/avatar.jpg -------------------------------------------------------------------------------- /scrs/requirements/bonus/static_page/conf/config.toml: -------------------------------------------------------------------------------- 1 | #baseURL = "https://vbachele.42.fr/static" 2 | title = "42 fitness" 3 | theme = "m10c" 4 | paginate = 8 5 | canonifyURLs = true 6 | 7 | [menu] 8 | [[menu.main]] 9 | identifier = "home" 10 | name = "Home" 11 | url = "/" 12 | weight = 1 13 | [[menu.main]] 14 | identifier = "about" 15 | name = "About" 16 | url = "/about" 17 | weight = 2 18 | 19 | [params] 20 | author = "Vincent Bachelet" 21 | description = "Student @42Paris && fitness addict" 22 | menu_item_separator = " - " 23 | [[params.social]] 24 | icon = "github" 25 | name = "Github" 26 | url = "https://github.com/vincentbachelet-collab" -------------------------------------------------------------------------------- /scrs/requirements/bonus/static_page/conf/presentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Presentation" 3 | date: 2022-10-06T10:46:32Z 4 | draft: false 5 | --- 6 | 7 | This page has been entirely designed to respond to a bonus from the school 42 inception project. 8 | 9 | # Welcome to the 42 fitness_page 🐋 10 | 11 | ### What is **42 fitness** 12 | 13 | 42 fitness is an association of 42 school with the purpose of developing sport inside the school. 14 | 15 | ### You want to join us? 16 | 17 | Come every wednesday at 6:30 to 42 and you will enjoy one hour of sweating. 18 | 19 | ![Image 42 fitness](/42fitness.jpg) -------------------------------------------------------------------------------- /scrs/requirements/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y mariadb-server \ 5 | mariadb-client \ 6 | vim \ 7 | && rm -rf /var/lib/apt/lists/* 8 | 9 | #Allow to run the daemon of mysql 10 | # Purge and re-create /var/lib/mysql with appropriate ownership 11 | # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime 12 | RUN mkdir -p /var/run/mysqld \ 13 | && chown -R mysql:mysql /var/run/mysqld \ 14 | && chmod 777 /var/run/mysqld 15 | 16 | EXPOSE 3306 17 | 18 | #COPY ./conf/mysqld.conf ~/my.cnf 19 | #COPY ./conf/mysqld.conf /etc/mysql/my.cnf 20 | #COPY ./conf/mysqld.conf /etc/my.cnf 21 | 22 | 23 | #Copy of the .sh and .sql in the /bin of the container to be able to run the program 24 | # Give the right to execute + launch the .sh 25 | COPY ./tools/mariadb.sh /usr/local/bin/ 26 | COPY ./conf/wordpress.sql /usr/local/bin/ 27 | RUN chmod +x /usr/local/bin/mariadb.sh 28 | RUN chmod +x /usr/local/bin/wordpress.sql 29 | 30 | ENTRYPOINT [ "/usr/local/bin/mariadb.sh" ] 31 | 32 | #Command to launch mariadb and enable the database to listen globally - also can be put on mysqldump.cnf file 33 | CMD ["mysqld", "--bind-address=0.0.0.0"] 34 | 35 | -------------------------------------------------------------------------------- /scrs/requirements/mariadb/conf/mysqld.conf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | user = root 3 | port = 3306 4 | datadir = /var/lib/mysql 5 | socket = /var/run/mysqld/mysqld.sock 6 | skip-networking = false 7 | bind-address = 0.0.0.0 -------------------------------------------------------------------------------- /scrs/requirements/mariadb/conf/wordpress.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.19 Distrib 10.3.36-MariaDB, for debian-linux-gnu (aarch64) 2 | -- 3 | -- Host: localhost Database: wordpress 4 | -- ------------------------------------------------------ 5 | -- Server version 10.3.36-MariaDB-0+deb10u1 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `wp_commentmeta` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `wp_commentmeta`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!40101 SET character_set_client = utf8 */; 25 | CREATE TABLE `wp_commentmeta` ( 26 | `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 27 | `comment_id` bigint(20) unsigned NOT NULL DEFAULT 0, 28 | `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 29 | `meta_value` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, 30 | PRIMARY KEY (`meta_id`), 31 | KEY `comment_id` (`comment_id`), 32 | KEY `meta_key` (`meta_key`(191)) 33 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 34 | /*!40101 SET character_set_client = @saved_cs_client */; 35 | 36 | -- 37 | -- Dumping data for table `wp_commentmeta` 38 | -- 39 | 40 | LOCK TABLES `wp_commentmeta` WRITE; 41 | /*!40000 ALTER TABLE `wp_commentmeta` DISABLE KEYS */; 42 | /*!40000 ALTER TABLE `wp_commentmeta` ENABLE KEYS */; 43 | UNLOCK TABLES; 44 | 45 | -- 46 | -- Table structure for table `wp_comments` 47 | -- 48 | 49 | DROP TABLE IF EXISTS `wp_comments`; 50 | /*!40101 SET @saved_cs_client = @@character_set_client */; 51 | /*!40101 SET character_set_client = utf8 */; 52 | CREATE TABLE `wp_comments` ( 53 | `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 54 | `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT 0, 55 | `comment_author` tinytext COLLATE utf8mb4_unicode_ci NOT NULL, 56 | `comment_author_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 57 | `comment_author_url` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 58 | `comment_author_IP` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 59 | `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 60 | `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 61 | `comment_content` text COLLATE utf8mb4_unicode_ci NOT NULL, 62 | `comment_karma` int(11) NOT NULL DEFAULT 0, 63 | `comment_approved` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1', 64 | `comment_agent` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 65 | `comment_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'comment', 66 | `comment_parent` bigint(20) unsigned NOT NULL DEFAULT 0, 67 | `user_id` bigint(20) unsigned NOT NULL DEFAULT 0, 68 | PRIMARY KEY (`comment_ID`), 69 | KEY `comment_post_ID` (`comment_post_ID`), 70 | KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`), 71 | KEY `comment_date_gmt` (`comment_date_gmt`), 72 | KEY `comment_parent` (`comment_parent`), 73 | KEY `comment_author_email` (`comment_author_email`(10)) 74 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 75 | /*!40101 SET character_set_client = @saved_cs_client */; 76 | 77 | -- 78 | -- Dumping data for table `wp_comments` 79 | -- 80 | 81 | LOCK TABLES `wp_comments` WRITE; 82 | /*!40000 ALTER TABLE `wp_comments` DISABLE KEYS */; 83 | INSERT INTO `wp_comments` VALUES (1,1,'A WordPress Commenter','wapuu@wordpress.example','https://wordpress.org/','','2022-09-28 15:59:53','2022-09-28 15:59:53','Hi, this is a comment.\nTo get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.\nCommenter avatars come from Gravatar.',0,'1','','comment',0,0); 84 | /*!40000 ALTER TABLE `wp_comments` ENABLE KEYS */; 85 | UNLOCK TABLES; 86 | 87 | -- 88 | -- Table structure for table `wp_links` 89 | -- 90 | 91 | DROP TABLE IF EXISTS `wp_links`; 92 | /*!40101 SET @saved_cs_client = @@character_set_client */; 93 | /*!40101 SET character_set_client = utf8 */; 94 | CREATE TABLE `wp_links` ( 95 | `link_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 96 | `link_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 97 | `link_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 98 | `link_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 99 | `link_target` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 100 | `link_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 101 | `link_visible` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Y', 102 | `link_owner` bigint(20) unsigned NOT NULL DEFAULT 1, 103 | `link_rating` int(11) NOT NULL DEFAULT 0, 104 | `link_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 105 | `link_rel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 106 | `link_notes` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, 107 | `link_rss` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 108 | PRIMARY KEY (`link_id`), 109 | KEY `link_visible` (`link_visible`) 110 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 111 | /*!40101 SET character_set_client = @saved_cs_client */; 112 | 113 | -- 114 | -- Dumping data for table `wp_links` 115 | -- 116 | 117 | LOCK TABLES `wp_links` WRITE; 118 | /*!40000 ALTER TABLE `wp_links` DISABLE KEYS */; 119 | /*!40000 ALTER TABLE `wp_links` ENABLE KEYS */; 120 | UNLOCK TABLES; 121 | 122 | -- 123 | -- Table structure for table `wp_options` 124 | -- 125 | 126 | DROP TABLE IF EXISTS `wp_options`; 127 | /*!40101 SET @saved_cs_client = @@character_set_client */; 128 | /*!40101 SET character_set_client = utf8 */; 129 | CREATE TABLE `wp_options` ( 130 | `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 131 | `option_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 132 | `option_value` longtext COLLATE utf8mb4_unicode_ci NOT NULL, 133 | `autoload` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'yes', 134 | PRIMARY KEY (`option_id`), 135 | UNIQUE KEY `option_name` (`option_name`), 136 | KEY `autoload` (`autoload`) 137 | ) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 138 | /*!40101 SET character_set_client = @saved_cs_client */; 139 | 140 | -- 141 | -- Dumping data for table `wp_options` 142 | -- 143 | 144 | LOCK TABLES `wp_options` WRITE; 145 | /*!40000 ALTER TABLE `wp_options` DISABLE KEYS */; 146 | INSERT INTO `wp_options` VALUES (1,'siteurl','https://vbachele.42.fr','yes'),(2,'home','https://vbachele.42.fr','yes'),(3,'blogname','inception','yes'),(4,'blogdescription','Just another WordPress site','yes'),(5,'users_can_register','0','yes'),(6,'admin_email','vcbachelet@gmail.com','yes'),(7,'start_of_week','1','yes'),(8,'use_balanceTags','0','yes'),(9,'use_smilies','1','yes'),(10,'require_name_email','1','yes'),(11,'comments_notify','1','yes'),(12,'posts_per_rss','10','yes'),(13,'rss_use_excerpt','0','yes'),(14,'mailserver_url','mail.example.com','yes'),(15,'mailserver_login','login@example.com','yes'),(16,'mailserver_pass','password','yes'),(17,'mailserver_port','110','yes'),(18,'default_category','1','yes'),(19,'default_comment_status','open','yes'),(20,'default_ping_status','open','yes'),(21,'default_pingback_flag','1','yes'),(22,'posts_per_page','10','yes'),(23,'date_format','F j, Y','yes'),(24,'time_format','g:i a','yes'),(25,'links_updated_date_format','F j, Y g:i a','yes'),(26,'comment_moderation','0','yes'),(27,'moderation_notify','1','yes'),(28,'permalink_structure','','yes'),(29,'rewrite_rules','','yes'),(30,'hack_file','0','yes'),(31,'blog_charset','UTF-8','yes'),(32,'moderation_keys','','no'),(33,'active_plugins','a:0:{}','yes'),(34,'category_base','','yes'),(35,'ping_sites','http://rpc.pingomatic.com/','yes'),(36,'comment_max_links','2','yes'),(37,'gmt_offset','0','yes'),(38,'default_email_category','1','yes'),(39,'recently_edited','','no'),(40,'template','twentytwentytwo','yes'),(41,'stylesheet','twentytwentytwo','yes'),(42,'comment_registration','0','yes'),(43,'html_type','text/html','yes'),(44,'use_trackback','0','yes'),(45,'default_role','subscriber','yes'),(46,'db_version','53496','yes'),(47,'uploads_use_yearmonth_folders','1','yes'),(48,'upload_path','','yes'),(49,'blog_public','1','yes'),(50,'default_link_category','2','yes'),(51,'show_on_front','posts','yes'),(52,'tag_base','','yes'),(53,'show_avatars','1','yes'),(54,'avatar_rating','G','yes'),(55,'upload_url_path','','yes'),(56,'thumbnail_size_w','150','yes'),(57,'thumbnail_size_h','150','yes'),(58,'thumbnail_crop','1','yes'),(59,'medium_size_w','300','yes'),(60,'medium_size_h','300','yes'),(61,'avatar_default','mystery','yes'),(62,'large_size_w','1024','yes'),(63,'large_size_h','1024','yes'),(64,'image_default_link_type','none','yes'),(65,'image_default_size','','yes'),(66,'image_default_align','','yes'),(67,'close_comments_for_old_posts','0','yes'),(68,'close_comments_days_old','14','yes'),(69,'thread_comments','1','yes'),(70,'thread_comments_depth','5','yes'),(71,'page_comments','0','yes'),(72,'comments_per_page','50','yes'),(73,'default_comments_page','newest','yes'),(74,'comment_order','asc','yes'),(75,'sticky_posts','a:0:{}','yes'),(76,'widget_categories','a:0:{}','yes'),(77,'widget_text','a:0:{}','yes'),(78,'widget_rss','a:0:{}','yes'),(79,'uninstall_plugins','a:0:{}','no'),(80,'timezone_string','','yes'),(81,'page_for_posts','0','yes'),(82,'page_on_front','0','yes'),(83,'default_post_format','0','yes'),(84,'link_manager_enabled','0','yes'),(85,'finished_splitting_shared_terms','1','yes'),(86,'site_icon','0','yes'),(87,'medium_large_size_w','768','yes'),(88,'medium_large_size_h','0','yes'),(89,'wp_page_for_privacy_policy','3','yes'),(90,'show_comments_cookies_opt_in','1','yes'),(91,'admin_email_lifespan','1679932792','yes'),(92,'disallowed_keys','','no'),(93,'comment_previously_approved','1','yes'),(94,'auto_plugin_theme_update_emails','a:0:{}','no'),(95,'auto_update_core_dev','enabled','yes'),(96,'auto_update_core_minor','enabled','yes'),(97,'auto_update_core_major','enabled','yes'),(98,'wp_force_deactivated_plugins','a:0:{}','yes'),(99,'initial_db_version','53496','yes'),(100,'wp_user_roles','a:5:{s:13:\"administrator\";a:2:{s:4:\"name\";s:13:\"Administrator\";s:12:\"capabilities\";a:61:{s:13:\"switch_themes\";b:1;s:11:\"edit_themes\";b:1;s:16:\"activate_plugins\";b:1;s:12:\"edit_plugins\";b:1;s:10:\"edit_users\";b:1;s:10:\"edit_files\";b:1;s:14:\"manage_options\";b:1;s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:6:\"import\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:8:\"level_10\";b:1;s:7:\"level_9\";b:1;s:7:\"level_8\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;s:12:\"delete_users\";b:1;s:12:\"create_users\";b:1;s:17:\"unfiltered_upload\";b:1;s:14:\"edit_dashboard\";b:1;s:14:\"update_plugins\";b:1;s:14:\"delete_plugins\";b:1;s:15:\"install_plugins\";b:1;s:13:\"update_themes\";b:1;s:14:\"install_themes\";b:1;s:11:\"update_core\";b:1;s:10:\"list_users\";b:1;s:12:\"remove_users\";b:1;s:13:\"promote_users\";b:1;s:18:\"edit_theme_options\";b:1;s:13:\"delete_themes\";b:1;s:6:\"export\";b:1;}}s:6:\"editor\";a:2:{s:4:\"name\";s:6:\"Editor\";s:12:\"capabilities\";a:34:{s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;}}s:6:\"author\";a:2:{s:4:\"name\";s:6:\"Author\";s:12:\"capabilities\";a:10:{s:12:\"upload_files\";b:1;s:10:\"edit_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;s:22:\"delete_published_posts\";b:1;}}s:11:\"contributor\";a:2:{s:4:\"name\";s:11:\"Contributor\";s:12:\"capabilities\";a:5:{s:10:\"edit_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;}}s:10:\"subscriber\";a:2:{s:4:\"name\";s:10:\"Subscriber\";s:12:\"capabilities\";a:2:{s:4:\"read\";b:1;s:7:\"level_0\";b:1;}}}','yes'),(101,'fresh_site','1','yes'),(102,'user_count','1','no'),(103,'widget_block','a:6:{i:2;a:1:{s:7:\"content\";s:19:\"\";}i:3;a:1:{s:7:\"content\";s:154:\"

Recent Posts

\";}i:4;a:1:{s:7:\"content\";s:227:\"

Recent Comments

\";}i:5;a:1:{s:7:\"content\";s:146:\"

Archives

\";}i:6;a:1:{s:7:\"content\";s:150:\"

Categories

\";}s:12:\"_multiwidget\";i:1;}','yes'),(104,'sidebars_widgets','a:4:{s:19:\"wp_inactive_widgets\";a:0:{}s:9:\"sidebar-1\";a:3:{i:0;s:7:\"block-2\";i:1;s:7:\"block-3\";i:2;s:7:\"block-4\";}s:9:\"sidebar-2\";a:2:{i:0;s:7:\"block-5\";i:1;s:7:\"block-6\";}s:13:\"array_version\";i:3;}','yes'),(105,'cron','a:7:{i:1664380793;a:6:{s:32:\"recovery_mode_clean_expired_keys\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:18:\"wp_https_detection\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}s:34:\"wp_privacy_delete_old_export_files\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}s:16:\"wp_version_check\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}s:17:\"wp_update_plugins\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}s:16:\"wp_update_themes\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1664380807;a:2:{s:19:\"wp_scheduled_delete\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}s:25:\"delete_expired_transients\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1664380808;a:1:{s:21:\"wp_update_user_counts\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}i:1664380810;a:1:{s:30:\"wp_scheduled_auto_draft_delete\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1664380868;a:1:{s:28:\"wp_update_comment_type_batch\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:2:{s:8:\"schedule\";b:0;s:4:\"args\";a:0:{}}}}i:1664467193;a:1:{s:30:\"wp_site_health_scheduled_check\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"weekly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:604800;}}}s:7:\"version\";i:2;}','yes'),(106,'logged_in_key','0pPpSGa7if6aia,G([]s6S|:0HEv+5vXDrM1)z^dCl$[*Wh6Nxo1}Ew`gb91@-n66+LoqG3','no'),(119,'widget_tag_cloud','a:1:{s:12:\"_multiwidget\";i:1;}','yes'),(120,'widget_nav_menu','a:1:{s:12:\"_multiwidget\";i:1;}','yes'),(121,'widget_custom_html','a:1:{s:12:\"_multiwidget\";i:1;}','yes'),(122,'_transient_doing_cron','1664380867.2866480350494384765625','yes'),(125,'theme_mods_twentytwentytwo','a:1:{s:18:\"custom_css_post_id\";i:-1;}','yes'),(128,'secure_auth_key','?ws9vp~[&m}O,1=eQc>vc/ZA[:w4$_Ivd;wj1n4?;0ELHS4W2dGO^UGFPXMgG5hD','no'),(129,'secure_auth_salt','v7&xj?C=OPG`o(tGD@0;d{CJ3%?UfS1w}PK|JJ]y.,iwe AUqr~`;

RSS Error: XML or PCRE extensions not loaded!

RSS Error: XML or PCRE extensions not loaded!

','no'),(141,'can_compress_scripts','1','no'),(142,'_site_transient_timeout_community-events-03439e947169b36a93ee8c20324432d6','1664424011','no'),(143,'_site_transient_community-events-03439e947169b36a93ee8c20324432d6','a:4:{s:9:\"sandboxed\";b:0;s:5:\"error\";N;s:8:\"location\";a:1:{s:2:\"ip\";s:10:\"172.20.0.0\";}s:6:\"events\";a:1:{i:0;a:10:{s:4:\"type\";s:8:\"wordcamp\";s:5:\"title\";s:13:\"WordCamp Lyon\";s:3:\"url\";s:31:\"https://lyon.wordcamp.org/2022/\";s:6:\"meetup\";N;s:10:\"meetup_url\";N;s:4:\"date\";s:19:\"2022-10-28 00:00:00\";s:8:\"end_date\";s:19:\"2022-10-28 00:00:00\";s:20:\"start_unix_timestamp\";i:1666908000;s:18:\"end_unix_timestamp\";i:1666908000;s:8:\"location\";a:4:{s:8:\"location\";s:12:\"Lyon, France\";s:7:\"country\";s:2:\"FR\";s:8:\"latitude\";d:45.7499567;s:9:\"longitude\";d:4.8221146;}}}}','no'),(144,'_transient_timeout_global_styles_twentytwentytwo','1664380927','no'),(145,'_transient_global_styles_twentytwentytwo','body{--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--foreground: #000000;--wp--preset--color--background: #ffffff;--wp--preset--color--primary: #1a4548;--wp--preset--color--secondary: #ffe2c7;--wp--preset--color--tertiary: #F6F6F6;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--gradient--vertical-secondary-to-tertiary: linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--tertiary) 100%);--wp--preset--gradient--vertical-secondary-to-background: linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%);--wp--preset--gradient--vertical-tertiary-to-background: linear-gradient(to bottom,var(--wp--preset--color--tertiary) 0%,var(--wp--preset--color--background) 100%);--wp--preset--gradient--diagonal-primary-to-foreground: linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%);--wp--preset--gradient--diagonal-secondary-to-background: linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%);--wp--preset--gradient--diagonal-background-to-secondary: linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%);--wp--preset--gradient--diagonal-tertiary-to-background: linear-gradient(to bottom right,var(--wp--preset--color--tertiary) 50%,var(--wp--preset--color--background) 50%);--wp--preset--gradient--diagonal-background-to-tertiary: linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--tertiary) 50%);--wp--preset--duotone--dark-grayscale: url(\'#wp-duotone-dark-grayscale\');--wp--preset--duotone--grayscale: url(\'#wp-duotone-grayscale\');--wp--preset--duotone--purple-yellow: url(\'#wp-duotone-purple-yellow\');--wp--preset--duotone--blue-red: url(\'#wp-duotone-blue-red\');--wp--preset--duotone--midnight: url(\'#wp-duotone-midnight\');--wp--preset--duotone--magenta-yellow: url(\'#wp-duotone-magenta-yellow\');--wp--preset--duotone--purple-green: url(\'#wp-duotone-purple-green\');--wp--preset--duotone--blue-orange: url(\'#wp-duotone-blue-orange\');--wp--preset--duotone--foreground-and-background: url(\'#wp-duotone-foreground-and-background\');--wp--preset--duotone--foreground-and-secondary: url(\'#wp-duotone-foreground-and-secondary\');--wp--preset--duotone--foreground-and-tertiary: url(\'#wp-duotone-foreground-and-tertiary\');--wp--preset--duotone--primary-and-background: url(\'#wp-duotone-primary-and-background\');--wp--preset--duotone--primary-and-secondary: url(\'#wp-duotone-primary-and-secondary\');--wp--preset--duotone--primary-and-tertiary: url(\'#wp-duotone-primary-and-tertiary\');--wp--preset--font-size--small: 1rem;--wp--preset--font-size--medium: 1.125rem;--wp--preset--font-size--large: 1.75rem;--wp--preset--font-size--x-large: clamp(1.75rem, 3vw, 2.25rem);--wp--preset--font-family--system-font: -apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;--wp--preset--font-family--source-serif-pro: \"Source Serif Pro\", serif;--wp--custom--spacing--small: max(1.25rem, 5vw);--wp--custom--spacing--medium: clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap)));--wp--custom--spacing--large: clamp(4rem, 10vw, 8rem);--wp--custom--spacing--outer: var(--wp--custom--spacing--small, 1.25rem);--wp--custom--typography--font-size--huge: clamp(2.25rem, 4vw, 2.75rem);--wp--custom--typography--font-size--gigantic: clamp(2.75rem, 6vw, 3.25rem);--wp--custom--typography--font-size--colossal: clamp(3.25rem, 8vw, 6.25rem);--wp--custom--typography--line-height--tiny: 1.15;--wp--custom--typography--line-height--small: 1.2;--wp--custom--typography--line-height--medium: 1.4;--wp--custom--typography--line-height--normal: 1.6;}body { margin: 0; }body{background-color: var(--wp--preset--color--background);color: var(--wp--preset--color--foreground);font-family: var(--wp--preset--font-family--system-font);font-size: var(--wp--preset--font-size--medium);line-height: var(--wp--custom--typography--line-height--normal);--wp--style--block-gap: 1.5rem;}.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }.wp-site-blocks > * + * { margin-block-start: var( --wp--style--block-gap ); }h1{font-family: var(--wp--preset--font-family--source-serif-pro);font-size: var(--wp--custom--typography--font-size--colossal);font-weight: 300;line-height: var(--wp--custom--typography--line-height--tiny);}h2{font-family: var(--wp--preset--font-family--source-serif-pro);font-size: var(--wp--custom--typography--font-size--gigantic);font-weight: 300;line-height: var(--wp--custom--typography--line-height--small);}h3{font-family: var(--wp--preset--font-family--source-serif-pro);font-size: var(--wp--custom--typography--font-size--huge);font-weight: 300;line-height: var(--wp--custom--typography--line-height--tiny);}h4{font-family: var(--wp--preset--font-family--source-serif-pro);font-size: var(--wp--preset--font-size--x-large);font-weight: 300;line-height: var(--wp--custom--typography--line-height--tiny);}h5{font-family: var(--wp--preset--font-family--system-font);font-size: var(--wp--preset--font-size--medium);font-weight: 700;line-height: var(--wp--custom--typography--line-height--normal);text-transform: uppercase;}h6{font-family: var(--wp--preset--font-family--system-font);font-size: var(--wp--preset--font-size--medium);font-weight: 400;line-height: var(--wp--custom--typography--line-height--normal);text-transform: uppercase;}a{color: var(--wp--preset--color--foreground);}.wp-block-button__link{background-color: var(--wp--preset--color--primary);border-radius: 0;color: var(--wp--preset--color--background);font-size: var(--wp--preset--font-size--medium);}.wp-block-post-title{font-family: var(--wp--preset--font-family--source-serif-pro);font-size: var(--wp--custom--typography--font-size--gigantic);font-weight: 300;line-height: var(--wp--custom--typography--line-height--tiny);}.wp-block-post-comments{padding-top: var(--wp--custom--spacing--small);}.wp-block-pullquote{border-width: 1px 0;}.wp-block-query-title{font-family: var(--wp--preset--font-family--source-serif-pro);font-size: var(--wp--custom--typography--font-size--gigantic);font-weight: 300;line-height: var(--wp--custom--typography--line-height--small);}.wp-block-quote{border-width: 1px;}.wp-block-site-title{font-family: var(--wp--preset--font-family--system-font);font-size: var(--wp--preset--font-size--medium);font-style: italic;font-weight: normal;line-height: var(--wp--custom--typography--line-height--normal);}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-foreground-color{color: var(--wp--preset--color--foreground) !important;}.has-background-color{color: var(--wp--preset--color--background) !important;}.has-primary-color{color: var(--wp--preset--color--primary) !important;}.has-secondary-color{color: var(--wp--preset--color--secondary) !important;}.has-tertiary-color{color: var(--wp--preset--color--tertiary) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-foreground-background-color{background-color: var(--wp--preset--color--foreground) !important;}.has-background-background-color{background-color: var(--wp--preset--color--background) !important;}.has-primary-background-color{background-color: var(--wp--preset--color--primary) !important;}.has-secondary-background-color{background-color: var(--wp--preset--color--secondary) !important;}.has-tertiary-background-color{background-color: var(--wp--preset--color--tertiary) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-foreground-border-color{border-color: var(--wp--preset--color--foreground) !important;}.has-background-border-color{border-color: var(--wp--preset--color--background) !important;}.has-primary-border-color{border-color: var(--wp--preset--color--primary) !important;}.has-secondary-border-color{border-color: var(--wp--preset--color--secondary) !important;}.has-tertiary-border-color{border-color: var(--wp--preset--color--tertiary) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-vertical-secondary-to-tertiary-gradient-background{background: var(--wp--preset--gradient--vertical-secondary-to-tertiary) !important;}.has-vertical-secondary-to-background-gradient-background{background: var(--wp--preset--gradient--vertical-secondary-to-background) !important;}.has-vertical-tertiary-to-background-gradient-background{background: var(--wp--preset--gradient--vertical-tertiary-to-background) !important;}.has-diagonal-primary-to-foreground-gradient-background{background: var(--wp--preset--gradient--diagonal-primary-to-foreground) !important;}.has-diagonal-secondary-to-background-gradient-background{background: var(--wp--preset--gradient--diagonal-secondary-to-background) !important;}.has-diagonal-background-to-secondary-gradient-background{background: var(--wp--preset--gradient--diagonal-background-to-secondary) !important;}.has-diagonal-tertiary-to-background-gradient-background{background: var(--wp--preset--gradient--diagonal-tertiary-to-background) !important;}.has-diagonal-background-to-tertiary-gradient-background{background: var(--wp--preset--gradient--diagonal-background-to-tertiary) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;}.has-system-font-font-family{font-family: var(--wp--preset--font-family--system-font) !important;}.has-source-serif-pro-font-family{font-family: var(--wp--preset--font-family--source-serif-pro) !important;}','no'),(146,'_transient_timeout_global_styles_svg_filters_twentytwentytwo','1664380927','no'),(147,'_transient_global_styles_svg_filters_twentytwentytwo','','no'); 147 | /*!40000 ALTER TABLE `wp_options` ENABLE KEYS */; 148 | UNLOCK TABLES; 149 | 150 | -- 151 | -- Table structure for table `wp_postmeta` 152 | -- 153 | 154 | DROP TABLE IF EXISTS `wp_postmeta`; 155 | /*!40101 SET @saved_cs_client = @@character_set_client */; 156 | /*!40101 SET character_set_client = utf8 */; 157 | CREATE TABLE `wp_postmeta` ( 158 | `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 159 | `post_id` bigint(20) unsigned NOT NULL DEFAULT 0, 160 | `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 161 | `meta_value` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, 162 | PRIMARY KEY (`meta_id`), 163 | KEY `post_id` (`post_id`), 164 | KEY `meta_key` (`meta_key`(191)) 165 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 166 | /*!40101 SET character_set_client = @saved_cs_client */; 167 | 168 | -- 169 | -- Dumping data for table `wp_postmeta` 170 | -- 171 | 172 | LOCK TABLES `wp_postmeta` WRITE; 173 | /*!40000 ALTER TABLE `wp_postmeta` DISABLE KEYS */; 174 | INSERT INTO `wp_postmeta` VALUES (1,2,'_wp_page_template','default'),(2,3,'_wp_page_template','default'); 175 | /*!40000 ALTER TABLE `wp_postmeta` ENABLE KEYS */; 176 | UNLOCK TABLES; 177 | 178 | -- 179 | -- Table structure for table `wp_posts` 180 | -- 181 | 182 | DROP TABLE IF EXISTS `wp_posts`; 183 | /*!40101 SET @saved_cs_client = @@character_set_client */; 184 | /*!40101 SET character_set_client = utf8 */; 185 | CREATE TABLE `wp_posts` ( 186 | `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 187 | `post_author` bigint(20) unsigned NOT NULL DEFAULT 0, 188 | `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 189 | `post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 190 | `post_content` longtext COLLATE utf8mb4_unicode_ci NOT NULL, 191 | `post_title` text COLLATE utf8mb4_unicode_ci NOT NULL, 192 | `post_excerpt` text COLLATE utf8mb4_unicode_ci NOT NULL, 193 | `post_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'publish', 194 | `comment_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open', 195 | `ping_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open', 196 | `post_password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 197 | `post_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 198 | `to_ping` text COLLATE utf8mb4_unicode_ci NOT NULL, 199 | `pinged` text COLLATE utf8mb4_unicode_ci NOT NULL, 200 | `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 201 | `post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 202 | `post_content_filtered` longtext COLLATE utf8mb4_unicode_ci NOT NULL, 203 | `post_parent` bigint(20) unsigned NOT NULL DEFAULT 0, 204 | `guid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 205 | `menu_order` int(11) NOT NULL DEFAULT 0, 206 | `post_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'post', 207 | `post_mime_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 208 | `comment_count` bigint(20) NOT NULL DEFAULT 0, 209 | PRIMARY KEY (`ID`), 210 | KEY `post_name` (`post_name`(191)), 211 | KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`), 212 | KEY `post_parent` (`post_parent`), 213 | KEY `post_author` (`post_author`) 214 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 215 | /*!40101 SET character_set_client = @saved_cs_client */; 216 | 217 | -- 218 | -- Dumping data for table `wp_posts` 219 | -- 220 | 221 | LOCK TABLES `wp_posts` WRITE; 222 | /*!40000 ALTER TABLE `wp_posts` DISABLE KEYS */; 223 | INSERT INTO `wp_posts` VALUES (1,1,'2022-09-28 15:59:53','2022-09-28 15:59:53','\n

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

\n','Hello world!','','publish','open','open','','hello-world','','','2022-09-28 15:59:53','2022-09-28 15:59:53','',0,'https://vbachele.42.fr/?p=1',0,'post','',1),(2,1,'2022-09-28 15:59:53','2022-09-28 15:59:53','\n

This is an example page. It\'s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:

\n\n\n\n

Hi there! I\'m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin\' caught in the rain.)

\n\n\n\n

...or something like this:

\n\n\n\n

The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.

\n\n\n\n

As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!

\n','Sample Page','','publish','closed','open','','sample-page','','','2022-09-28 15:59:53','2022-09-28 15:59:53','',0,'https://vbachele.42.fr/?page_id=2',0,'page','',0),(3,1,'2022-09-28 15:59:53','2022-09-28 15:59:53','

Who we are

Suggested text: Our website address is: https://vbachele.42.fr.

Comments

Suggested text: When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.

An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

Suggested text: If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

Suggested text: If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.

If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.

When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed.

If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Suggested text: Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.

These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

Suggested text: If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

Suggested text: If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.

For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

Suggested text: If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Suggested text: Visitor comments may be checked through an automated spam detection service.

','Privacy Policy','','draft','closed','open','','privacy-policy','','','2022-09-28 15:59:53','2022-09-28 15:59:53','',0,'https://vbachele.42.fr/?page_id=3',0,'page','',0),(4,1,'2022-09-28 16:00:10','0000-00-00 00:00:00','','Auto Draft','','auto-draft','open','open','','','','','2022-09-28 16:00:10','0000-00-00 00:00:00','',0,'https://vbachele.42.fr/?p=4',0,'post','',0); 224 | /*!40000 ALTER TABLE `wp_posts` ENABLE KEYS */; 225 | UNLOCK TABLES; 226 | 227 | -- 228 | -- Table structure for table `wp_term_relationships` 229 | -- 230 | 231 | DROP TABLE IF EXISTS `wp_term_relationships`; 232 | /*!40101 SET @saved_cs_client = @@character_set_client */; 233 | /*!40101 SET character_set_client = utf8 */; 234 | CREATE TABLE `wp_term_relationships` ( 235 | `object_id` bigint(20) unsigned NOT NULL DEFAULT 0, 236 | `term_taxonomy_id` bigint(20) unsigned NOT NULL DEFAULT 0, 237 | `term_order` int(11) NOT NULL DEFAULT 0, 238 | PRIMARY KEY (`object_id`,`term_taxonomy_id`), 239 | KEY `term_taxonomy_id` (`term_taxonomy_id`) 240 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 241 | /*!40101 SET character_set_client = @saved_cs_client */; 242 | 243 | -- 244 | -- Dumping data for table `wp_term_relationships` 245 | -- 246 | 247 | LOCK TABLES `wp_term_relationships` WRITE; 248 | /*!40000 ALTER TABLE `wp_term_relationships` DISABLE KEYS */; 249 | INSERT INTO `wp_term_relationships` VALUES (1,1,0); 250 | /*!40000 ALTER TABLE `wp_term_relationships` ENABLE KEYS */; 251 | UNLOCK TABLES; 252 | 253 | -- 254 | -- Table structure for table `wp_term_taxonomy` 255 | -- 256 | 257 | DROP TABLE IF EXISTS `wp_term_taxonomy`; 258 | /*!40101 SET @saved_cs_client = @@character_set_client */; 259 | /*!40101 SET character_set_client = utf8 */; 260 | CREATE TABLE `wp_term_taxonomy` ( 261 | `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 262 | `term_id` bigint(20) unsigned NOT NULL DEFAULT 0, 263 | `taxonomy` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 264 | `description` longtext COLLATE utf8mb4_unicode_ci NOT NULL, 265 | `parent` bigint(20) unsigned NOT NULL DEFAULT 0, 266 | `count` bigint(20) NOT NULL DEFAULT 0, 267 | PRIMARY KEY (`term_taxonomy_id`), 268 | UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`), 269 | KEY `taxonomy` (`taxonomy`) 270 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 271 | /*!40101 SET character_set_client = @saved_cs_client */; 272 | 273 | -- 274 | -- Dumping data for table `wp_term_taxonomy` 275 | -- 276 | 277 | LOCK TABLES `wp_term_taxonomy` WRITE; 278 | /*!40000 ALTER TABLE `wp_term_taxonomy` DISABLE KEYS */; 279 | INSERT INTO `wp_term_taxonomy` VALUES (1,1,'category','',0,1); 280 | /*!40000 ALTER TABLE `wp_term_taxonomy` ENABLE KEYS */; 281 | UNLOCK TABLES; 282 | 283 | -- 284 | -- Table structure for table `wp_termmeta` 285 | -- 286 | 287 | DROP TABLE IF EXISTS `wp_termmeta`; 288 | /*!40101 SET @saved_cs_client = @@character_set_client */; 289 | /*!40101 SET character_set_client = utf8 */; 290 | CREATE TABLE `wp_termmeta` ( 291 | `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 292 | `term_id` bigint(20) unsigned NOT NULL DEFAULT 0, 293 | `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 294 | `meta_value` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, 295 | PRIMARY KEY (`meta_id`), 296 | KEY `term_id` (`term_id`), 297 | KEY `meta_key` (`meta_key`(191)) 298 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 299 | /*!40101 SET character_set_client = @saved_cs_client */; 300 | 301 | -- 302 | -- Dumping data for table `wp_termmeta` 303 | -- 304 | 305 | LOCK TABLES `wp_termmeta` WRITE; 306 | /*!40000 ALTER TABLE `wp_termmeta` DISABLE KEYS */; 307 | /*!40000 ALTER TABLE `wp_termmeta` ENABLE KEYS */; 308 | UNLOCK TABLES; 309 | 310 | -- 311 | -- Table structure for table `wp_terms` 312 | -- 313 | 314 | DROP TABLE IF EXISTS `wp_terms`; 315 | /*!40101 SET @saved_cs_client = @@character_set_client */; 316 | /*!40101 SET character_set_client = utf8 */; 317 | CREATE TABLE `wp_terms` ( 318 | `term_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 319 | `name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 320 | `slug` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 321 | `term_group` bigint(10) NOT NULL DEFAULT 0, 322 | PRIMARY KEY (`term_id`), 323 | KEY `slug` (`slug`(191)), 324 | KEY `name` (`name`(191)) 325 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 326 | /*!40101 SET character_set_client = @saved_cs_client */; 327 | 328 | -- 329 | -- Dumping data for table `wp_terms` 330 | -- 331 | 332 | LOCK TABLES `wp_terms` WRITE; 333 | /*!40000 ALTER TABLE `wp_terms` DISABLE KEYS */; 334 | INSERT INTO `wp_terms` VALUES (1,'Uncategorized','uncategorized',0); 335 | /*!40000 ALTER TABLE `wp_terms` ENABLE KEYS */; 336 | UNLOCK TABLES; 337 | 338 | -- 339 | -- Table structure for table `wp_usermeta` 340 | -- 341 | 342 | DROP TABLE IF EXISTS `wp_usermeta`; 343 | /*!40101 SET @saved_cs_client = @@character_set_client */; 344 | /*!40101 SET character_set_client = utf8 */; 345 | CREATE TABLE `wp_usermeta` ( 346 | `umeta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 347 | `user_id` bigint(20) unsigned NOT NULL DEFAULT 0, 348 | `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 349 | `meta_value` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, 350 | PRIMARY KEY (`umeta_id`), 351 | KEY `user_id` (`user_id`), 352 | KEY `meta_key` (`meta_key`(191)) 353 | ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 354 | /*!40101 SET character_set_client = @saved_cs_client */; 355 | 356 | -- 357 | -- Dumping data for table `wp_usermeta` 358 | -- 359 | 360 | LOCK TABLES `wp_usermeta` WRITE; 361 | /*!40000 ALTER TABLE `wp_usermeta` DISABLE KEYS */; 362 | INSERT INTO `wp_usermeta` VALUES (1,1,'nickname','vbachele'),(2,1,'first_name',''),(3,1,'last_name',''),(4,1,'description',''),(5,1,'rich_editing','true'),(6,1,'syntax_highlighting','true'),(7,1,'comment_shortcuts','false'),(8,1,'admin_color','fresh'),(9,1,'use_ssl','0'),(10,1,'show_admin_bar_front','true'),(11,1,'locale',''),(12,1,'wp_capabilities','a:1:{s:13:\"administrator\";b:1;}'),(13,1,'wp_user_level','10'),(14,1,'dismissed_wp_pointers',''),(15,1,'show_welcome_panel','1'),(16,1,'session_tokens','a:1:{s:64:\"4a7c2a8d5986442ca800f40072b05bfa99f3b95e11a154caca92a8c1ccb98ddc\";a:4:{s:10:\"expiration\";i:1664553602;s:2:\"ip\";s:10:\"172.20.0.1\";s:2:\"ua\";s:117:\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\";s:5:\"login\";i:1664380802;}}'),(17,1,'wp_dashboard_quick_press_last_post_id','4'),(18,1,'community-events-location','a:1:{s:2:\"ip\";s:10:\"172.20.0.0\";}'); 363 | /*!40000 ALTER TABLE `wp_usermeta` ENABLE KEYS */; 364 | UNLOCK TABLES; 365 | 366 | -- 367 | -- Table structure for table `wp_users` 368 | -- 369 | 370 | DROP TABLE IF EXISTS `wp_users`; 371 | /*!40101 SET @saved_cs_client = @@character_set_client */; 372 | /*!40101 SET character_set_client = utf8 */; 373 | CREATE TABLE `wp_users` ( 374 | `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 375 | `user_login` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 376 | `user_pass` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 377 | `user_nicename` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 378 | `user_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 379 | `user_url` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 380 | `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 381 | `user_activation_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 382 | `user_status` int(11) NOT NULL DEFAULT 0, 383 | `display_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', 384 | PRIMARY KEY (`ID`), 385 | KEY `user_login_key` (`user_login`), 386 | KEY `user_nicename` (`user_nicename`), 387 | KEY `user_email` (`user_email`) 388 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 389 | /*!40101 SET character_set_client = @saved_cs_client */; 390 | 391 | -- 392 | -- Dumping data for table `wp_users` 393 | -- 394 | 395 | LOCK TABLES `wp_users` WRITE; 396 | /*!40000 ALTER TABLE `wp_users` DISABLE KEYS */; 397 | INSERT INTO `wp_users` VALUES (1,'vbachele','$P$BFwyV/GXu8rhctqT40E4ozlZ9vAoQg/','vbachele','vcbachelet@gmail.com','https://vbachele.42.fr','2022-09-28 15:59:52','',0,'vbachele'); 398 | /*!40000 ALTER TABLE `wp_users` ENABLE KEYS */; 399 | UNLOCK TABLES; 400 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 401 | 402 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 403 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 404 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 405 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 406 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 407 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 408 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 409 | 410 | -- Dump completed on 2022-09-28 16:02:22 -------------------------------------------------------------------------------- /scrs/requirements/mariadb/tools/mariadb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mysql_install_db 4 | 5 | /etc/init.d/mysql start 6 | 7 | #Check if the database exists 8 | 9 | if [ -d "/var/lib/mysql/$MYSQL_DATABASE" ] 10 | then 11 | 12 | echo "Database already exists" 13 | else 14 | 15 | # Set root option so that connexion without root password is not possible 16 | 17 | mysql_secure_installation << _EOF_ 18 | 19 | Y 20 | root4life 21 | root4life 22 | Y 23 | n 24 | Y 25 | Y 26 | _EOF_ 27 | 28 | #Add a root user on 127.0.0.1 to allow remote connexion 29 | #Flush privileges allow to your sql tables to be updated automatically when you modify it 30 | #mysql -uroot launch mysql command line client 31 | echo "GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '$MYSQL_ROOT_PASSWORD'; FLUSH PRIVILEGES;" | mysql -uroot 32 | 33 | #Create database and user in the database for wordpress 34 | 35 | echo "CREATE DATABASE IF NOT EXISTS $MYSQL_DATABASE; GRANT ALL ON $MYSQL_DATABASE.* TO '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD'; FLUSH PRIVILEGES;" | mysql -u root 36 | 37 | #Import database in the mysql command line 38 | mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE < /usr/local/bin/wordpress.sql 39 | 40 | fi 41 | 42 | /etc/init.d/mysql stop 43 | 44 | exec "$@" -------------------------------------------------------------------------------- /scrs/requirements/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | #install all the program 4 | RUN apt-get update 5 | RUN apt-get install -y nginx \ 6 | openssl 7 | 8 | # nginx SSL 9 | RUN mkdir /etc/nginx/ssl 10 | RUN openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes \ 11 | -out /etc/nginx/ssl/vbachele.crt \ 12 | -keyout /etc/nginx/ssl/vbachele.key \ 13 | -subj "/C=FR/ST=Paris/L=Paris/O=42 School/OU=vbachele/CN=vbachele/" 14 | 15 | COPY ./conf/nginx.conf /etc/nginx/conf.d 16 | 17 | # nginx config 18 | RUN mkdir -p /run/nginx 19 | 20 | #the only port allowed 21 | EXPOSE 443 22 | 23 | # Start nginx 24 | CMD ["nginx", "-g", "daemon off;"] -------------------------------------------------------------------------------- /scrs/requirements/nginx/conf/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen [::]:443 ssl; 4 | 5 | server_name vbachele.42.fr; 6 | # On note le cert et la key (necessaire protocole ssl) 7 | ssl_certificate /etc/nginx/ssl/vbachele.crt; 8 | ssl_certificate_key /etc/nginx/ssl/vbachele.key; 9 | 10 | # Protocole d'encryptions pour les cles ssl 11 | ssl_protocols TLSv1.2 TLSv1.3; 12 | 13 | # Fichiers a afficher et dossier ou les chercher 14 | root /var/www/html; 15 | index index.php index.nginx-debian.html; 16 | 17 | # Directive necessaire pour les endpoints, 18 | # Fast cgi necessaire pour nginx pour "traduire" le php 19 | location / { 20 | try_files $uri $uri/ /index.php$is_args$args; 21 | } 22 | 23 | location ~ \.php$ { 24 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 25 | fastcgi_pass wordpress:9000; #PHP for wordpress will listen on the port 9000 26 | fastcgi_index index.php; 27 | include fastcgi_params; 28 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 29 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 30 | } 31 | 32 | # BONUS PART # 33 | 34 | ## Adminer ## 35 | location ~ ^/adminer(/.*$|$) { 36 | fastcgi_index index.php; 37 | include /etc/nginx/fastcgi_params; 38 | fastcgi_param SCRIPT_FILENAME /var/www/html/index.php; 39 | fastcgi_pass adminer:9000; 40 | } 41 | ## hugo (Bonus for the service of your choice)## 42 | #proxy trafic on /me with hugo server 43 | location ^~ /me 44 | { 45 | include /etc/nginx/proxy_params; 46 | proxy_pass http://hugo:1313/me; 47 | } 48 | 49 | location ^~ /static 50 | { 51 | include /etc/nginx/proxy_params; 52 | proxy_pass http://static_page:1313/static; 53 | } 54 | ##Static page ## 55 | # END OF BONUS PART # 56 | } 57 | -------------------------------------------------------------------------------- /scrs/requirements/wordpress/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster 2 | 3 | RUN apt-get update && apt-get -y install \ 4 | wget \ 5 | curl \ 6 | bash \ 7 | php \ 8 | php-cgi \ 9 | php-mysql \ 10 | php-fpm \ 11 | php-pdo \ 12 | php-gd php-cli \ 13 | php-mbstring \ 14 | redis \ 15 | php-redis \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | # I need to install wp_cli command and put it in the right directory /usr/local/bin 19 | RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \ 20 | && chmod +x wp-cli.phar \ 21 | && mv wp-cli.phar /usr/local/bin/wp 22 | 23 | # Copy the .conf in the html directory 24 | COPY ./conf/www.conf /etc/php/7.3/fpm/pool.d/ 25 | 26 | #Create the folder to enable php start 27 | RUN mkdir /run/php 28 | 29 | #we copy the script, give the right to launch it in local on our computer 30 | COPY ./tools/create_wordpress.sh /usr/local/bin/ 31 | RUN chmod +x /usr/local/bin/create_wordpress.sh 32 | ENTRYPOINT ["/usr/local/bin/create_wordpress.sh"] 33 | 34 | #We go the html directory 35 | WORKDIR /var/www/html/ 36 | 37 | #We expose the 9000 port 38 | EXPOSE 9000 39 | 40 | #Launch PHP FPM in foreground and ignore deamonize from conf file (-F) 41 | CMD ["/usr/sbin/php-fpm7.3", "-F"] 42 | 43 | -------------------------------------------------------------------------------- /scrs/requirements/wordpress/conf/www.conf: -------------------------------------------------------------------------------- 1 | ; Start a new pool named 'www'. 2 | ; the variable $pool can be used in any directive and will be replaced by the 3 | ; pool name ('www' here) 4 | [www] 5 | 6 | ; Per pool prefix 7 | ; It only applies on the following directives: 8 | ; - 'access.log' 9 | ; - 'slowlog' 10 | ; - 'listen' (unixsocket) 11 | ; - 'chroot' 12 | ; - 'chdir' 13 | ; - 'php_values' 14 | ; - 'php_admin_values' 15 | ; When not set, the global prefix (or /usr) applies instead. 16 | ; Note: This directive can also be relative to the global prefix. 17 | ; Default Value: none 18 | ;prefix = /path/to/pools/$pool 19 | 20 | ; Unix user/group of processes 21 | ; Note: The user is mandatory. If the group is not set, the default user's group 22 | ; will be used. 23 | user = www-data 24 | group = www-data 25 | 26 | ; The address on which to accept FastCGI requests. 27 | ; Valid syntaxes are: 28 | ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on 29 | ; a specific port; 30 | ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on 31 | ; a specific port; 32 | ; 'port' - to listen on a TCP socket to all addresses 33 | ; (IPv6 and IPv4-mapped) on a specific port; 34 | ; '/path/to/unix/socket' - to listen on a unix socket. 35 | ; Note: This value is mandatory. 36 | listen = 0.0.0.0:9000 37 | 38 | ; Set listen(2) backlog. 39 | ; Default Value: 511 (-1 on FreeBSD and OpenBSD) 40 | ;listen.backlog = 511 41 | 42 | ; Set permissions for unix socket, if one is used. In Linux, read/write 43 | ; permissions must be set in order to allow connections from a web server. Many 44 | ; BSD-derived systems allow connections regardless of permissions. The owner 45 | ; and group can be specified either by name or by their numeric IDs. 46 | ; Default Values: user and group are set as the running user 47 | ; mode is set to 0660 48 | listen.owner = www-data 49 | listen.group = www-data 50 | ;listen.mode = 0660 51 | ; When POSIX Access Control Lists are supported you can set them using 52 | ; these options, value is a comma separated list of user/group names. 53 | ; When set, listen.owner and listen.group are ignored 54 | ;listen.acl_users = 55 | ;listen.acl_groups = 56 | 57 | ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. 58 | ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original 59 | ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address 60 | ; must be separated by a comma. If this value is left blank, connections will be 61 | ; accepted from any ip address. 62 | ; Default Value: any 63 | ;listen.allowed_clients = 127.0.0.1 64 | 65 | ; Specify the nice(2) priority to apply to the pool processes (only if set) 66 | ; The value can vary from -19 (highest priority) to 20 (lower priority) 67 | ; Note: - It will only work if the FPM master process is launched as root 68 | ; - The pool processes will inherit the master process priority 69 | ; unless it specified otherwise 70 | ; Default Value: no set 71 | ; process.priority = -19 72 | 73 | ; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user 74 | ; or group is differrent than the master process user. It allows to create process 75 | ; core dump and ptrace the process for the pool user. 76 | ; Default Value: no 77 | ; process.dumpable = yes 78 | 79 | ; Choose how the process manager will control the number of child processes. 80 | ; Possible Values: 81 | ; static - a fixed number (pm.max_children) of child processes; 82 | ; dynamic - the number of child processes are set dynamically based on the 83 | ; following directives. With this process management, there will be 84 | ; always at least 1 children. 85 | ; pm.max_children - the maximum number of children that can 86 | ; be alive at the same time. 87 | ; pm.start_servers - the number of children created on startup. 88 | ; pm.min_spare_servers - the minimum number of children in 'idle' 89 | ; state (waiting to process). If the number 90 | ; of 'idle' processes is less than this 91 | ; number then some children will be created. 92 | ; pm.max_spare_servers - the maximum number of children in 'idle' 93 | ; state (waiting to process). If the number 94 | ; of 'idle' processes is greater than this 95 | ; number then some children will be killed. 96 | ; ondemand - no children are created at startup. Children will be forked when 97 | ; new requests will connect. The following parameter are used: 98 | ; pm.max_children - the maximum number of children that 99 | ; can be alive at the same time. 100 | ; pm.process_idle_timeout - The number of seconds after which 101 | ; an idle process will be killed. 102 | ; Note: This value is mandatory. 103 | pm = dynamic 104 | 105 | ; The number of child processes to be created when pm is set to 'static' and the 106 | ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. 107 | ; This value sets the limit on the number of simultaneous requests that will be 108 | ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. 109 | ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP 110 | ; CGI. The below defaults are based on a server without much resources. Don't 111 | ; forget to tweak pm.* to fit your needs. 112 | ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' 113 | ; Note: This value is mandatory. 114 | pm.max_children = 25 115 | 116 | ; The number of child processes created on startup. 117 | ; Note: Used only when pm is set to 'dynamic' 118 | ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 119 | pm.start_servers = 5 120 | 121 | ; The desired minimum number of idle server processes. 122 | ; Note: Used only when pm is set to 'dynamic' 123 | ; Note: Mandatory when pm is set to 'dynamic' 124 | pm.min_spare_servers = 1 125 | 126 | ; The desired maximum number of idle server processes. 127 | ; Note: Used only when pm is set to 'dynamic' 128 | ; Note: Mandatory when pm is set to 'dynamic' 129 | pm.max_spare_servers = 10 130 | 131 | ; The number of seconds after which an idle process will be killed. 132 | ; Note: Used only when pm is set to 'ondemand' 133 | ; Default Value: 10s 134 | ;pm.process_idle_timeout = 10s; 135 | 136 | ; The number of requests each child process should execute before respawning. 137 | ; This can be useful to work around memory leaks in 3rd party libraries. For 138 | ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. 139 | ; Default Value: 0 140 | ;pm.max_requests = 500 141 | 142 | ; The URI to view the FPM status page. If this value is not set, no URI will be 143 | ; recognized as a status page. It shows the following informations: 144 | ; pool - the name of the pool; 145 | ; process manager - static, dynamic or ondemand; 146 | ; start time - the date and time FPM has started; 147 | ; start since - number of seconds since FPM has started; 148 | ; accepted conn - the number of request accepted by the pool; 149 | ; listen queue - the number of request in the queue of pending 150 | ; connections (see backlog in listen(2)); 151 | ; max listen queue - the maximum number of requests in the queue 152 | ; of pending connections since FPM has started; 153 | ; listen queue len - the size of the socket queue of pending connections; 154 | ; idle processes - the number of idle processes; 155 | ; active processes - the number of active processes; 156 | ; total processes - the number of idle + active processes; 157 | ; max active processes - the maximum number of active processes since FPM 158 | ; has started; 159 | ; max children reached - number of times, the process limit has been reached, 160 | ; when pm tries to start more children (works only for 161 | ; pm 'dynamic' and 'ondemand'); 162 | ; Value are updated in real time. 163 | ; Example output: 164 | ; pool: www 165 | ; process manager: static 166 | ; start time: 01/Jul/2011:17:53:49 +0200 167 | ; start since: 62636 168 | ; accepted conn: 190460 169 | ; listen queue: 0 170 | ; max listen queue: 1 171 | ; listen queue len: 42 172 | ; idle processes: 4 173 | ; active processes: 11 174 | ; total processes: 15 175 | ; max active processes: 12 176 | ; max children reached: 0 177 | ; 178 | ; By default the status page output is formatted as text/plain. Passing either 179 | ; 'html', 'xml' or 'json' in the query string will return the corresponding 180 | ; output syntax. Example: 181 | ; http://www.foo.bar/status 182 | ; http://www.foo.bar/status?json 183 | ; http://www.foo.bar/status?html 184 | ; http://www.foo.bar/status?xml 185 | ; 186 | ; By default the status page only outputs short status. Passing 'full' in the 187 | ; query string will also return status for each pool process. 188 | ; Example: 189 | ; http://www.foo.bar/status?full 190 | ; http://www.foo.bar/status?json&full 191 | ; http://www.foo.bar/status?html&full 192 | ; http://www.foo.bar/status?xml&full 193 | ; The Full status returns for each process: 194 | ; pid - the PID of the process; 195 | ; state - the state of the process (Idle, Running, ...); 196 | ; start time - the date and time the process has started; 197 | ; start since - the number of seconds since the process has started; 198 | ; requests - the number of requests the process has served; 199 | ; request duration - the duration in µs of the requests; 200 | ; request method - the request method (GET, POST, ...); 201 | ; request URI - the request URI with the query string; 202 | ; content length - the content length of the request (only with POST); 203 | ; user - the user (PHP_AUTH_USER) (or '-' if not set); 204 | ; script - the main script called (or '-' if not set); 205 | ; last request cpu - the %cpu the last request consumed 206 | ; it's always 0 if the process is not in Idle state 207 | ; because CPU calculation is done when the request 208 | ; processing has terminated; 209 | ; last request memory - the max amount of memory the last request consumed 210 | ; it's always 0 if the process is not in Idle state 211 | ; because memory calculation is done when the request 212 | ; processing has terminated; 213 | ; If the process is in Idle state, then informations are related to the 214 | ; last request the process has served. Otherwise informations are related to 215 | ; the current request being served. 216 | ; Example output: 217 | ; ************************ 218 | ; pid: 31330 219 | ; state: Running 220 | ; start time: 01/Jul/2011:17:53:49 +0200 221 | ; start since: 63087 222 | ; requests: 12808 223 | ; request duration: 1250261 224 | ; request method: GET 225 | ; request URI: /test_mem.php?N=10000 226 | ; content length: 0 227 | ; user: - 228 | ; script: /home/fat/web/docs/php/test_mem.php 229 | ; last request cpu: 0.00 230 | ; last request memory: 0 231 | ; 232 | ; Note: There is a real-time FPM status monitoring sample web page available 233 | ; It's available in: /usr/share/php/7.3/fpm/status.html 234 | ; 235 | ; Note: The value must start with a leading slash (/). The value can be 236 | ; anything, but it may not be a good idea to use the .php extension or it 237 | ; may conflict with a real PHP file. 238 | ; Default Value: not set 239 | ;pm.status_path = /status 240 | 241 | ; The ping URI to call the monitoring page of FPM. If this value is not set, no 242 | ; URI will be recognized as a ping page. This could be used to test from outside 243 | ; that FPM is alive and responding, or to 244 | ; - create a graph of FPM availability (rrd or such); 245 | ; - remove a server from a group if it is not responding (load balancing); 246 | ; - trigger alerts for the operating team (24/7). 247 | ; Note: The value must start with a leading slash (/). The value can be 248 | ; anything, but it may not be a good idea to use the .php extension or it 249 | ; may conflict with a real PHP file. 250 | ; Default Value: not set 251 | ;ping.path = /ping 252 | 253 | ; This directive may be used to customize the response of a ping request. The 254 | ; response is formatted as text/plain with a 200 response code. 255 | ; Default Value: pong 256 | ;ping.response = pong 257 | 258 | ; The access log file 259 | ; Default: not set 260 | ;access.log = log/$pool.access.log 261 | 262 | ; The access log format. 263 | ; The following syntax is allowed 264 | ; %%: the '%' character 265 | ; %C: %CPU used by the request 266 | ; it can accept the following format: 267 | ; - %{user}C for user CPU only 268 | ; - %{system}C for system CPU only 269 | ; - %{total}C for user + system CPU (default) 270 | ; %d: time taken to serve the request 271 | ; it can accept the following format: 272 | ; - %{seconds}d (default) 273 | ; - %{miliseconds}d 274 | ; - %{mili}d 275 | ; - %{microseconds}d 276 | ; - %{micro}d 277 | ; %e: an environment variable (same as $_ENV or $_SERVER) 278 | ; it must be associated with embraces to specify the name of the env 279 | ; variable. Some exemples: 280 | ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e 281 | ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e 282 | ; %f: script filename 283 | ; %l: content-length of the request (for POST request only) 284 | ; %m: request method 285 | ; %M: peak of memory allocated by PHP 286 | ; it can accept the following format: 287 | ; - %{bytes}M (default) 288 | ; - %{kilobytes}M 289 | ; - %{kilo}M 290 | ; - %{megabytes}M 291 | ; - %{mega}M 292 | ; %n: pool name 293 | ; %o: output header 294 | ; it must be associated with embraces to specify the name of the header: 295 | ; - %{Content-Type}o 296 | ; - %{X-Powered-By}o 297 | ; - %{Transfert-Encoding}o 298 | ; - .... 299 | ; %p: PID of the child that serviced the request 300 | ; %P: PID of the parent of the child that serviced the request 301 | ; %q: the query string 302 | ; %Q: the '?' character if query string exists 303 | ; %r: the request URI (without the query string, see %q and %Q) 304 | ; %R: remote IP address 305 | ; %s: status (response code) 306 | ; %t: server time the request was received 307 | ; it can accept a strftime(3) format: 308 | ; %d/%b/%Y:%H:%M:%S %z (default) 309 | ; The strftime(3) format must be encapsuled in a %{}t tag 310 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 311 | ; %T: time the log has been written (the request has finished) 312 | ; it can accept a strftime(3) format: 313 | ; %d/%b/%Y:%H:%M:%S %z (default) 314 | ; The strftime(3) format must be encapsuled in a %{}t tag 315 | ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t 316 | ; %u: remote user 317 | ; 318 | ; Default: "%R - %u %t \"%m %r\" %s" 319 | ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" 320 | 321 | ; The log file for slow requests 322 | ; Default Value: not set 323 | ; Note: slowlog is mandatory if request_slowlog_timeout is set 324 | ;slowlog = log/$pool.log.slow 325 | 326 | ; The timeout for serving a single request after which a PHP backtrace will be 327 | ; dumped to the 'slowlog' file. A value of '0s' means 'off'. 328 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 329 | ; Default Value: 0 330 | ;request_slowlog_timeout = 0 331 | 332 | ; Depth of slow log stack trace. 333 | ; Default Value: 20 334 | ;request_slowlog_trace_depth = 20 335 | 336 | ; The timeout for serving a single request after which the worker process will 337 | ; be killed. This option should be used when the 'max_execution_time' ini option 338 | ; does not stop script execution for some reason. A value of '0' means 'off'. 339 | ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) 340 | ; Default Value: 0 341 | ;request_terminate_timeout = 0 342 | 343 | ; The timeout set by 'request_terminate_timeout' ini option is not engaged after 344 | ; application calls 'fastcgi_finish_request' or when application has finished and 345 | ; shutdown functions are being called (registered via register_shutdown_function). 346 | ; This option will enable timeout limit to be applied unconditionally 347 | ; even in such cases. 348 | ; Default Value: no 349 | ;request_terminate_timeout_track_finished = no 350 | 351 | ; Set open file descriptor rlimit. 352 | ; Default Value: system defined value 353 | ;rlimit_files = 1024 354 | 355 | ; Set max core size rlimit. 356 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 357 | ; Default Value: system defined value 358 | ;rlimit_core = 0 359 | 360 | ; Chroot to this directory at the start. This value must be defined as an 361 | ; absolute path. When this value is not set, chroot is not used. 362 | ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one 363 | ; of its subdirectories. If the pool prefix is not set, the global prefix 364 | ; will be used instead. 365 | ; Note: chrooting is a great security feature and should be used whenever 366 | ; possible. However, all PHP paths will be relative to the chroot 367 | ; (error_log, sessions.save_path, ...). 368 | ; Default Value: not set 369 | ;chroot = 370 | 371 | ; Chdir to this directory at the start. 372 | ; Note: relative path can be used. 373 | ; Default Value: current directory or / when chroot 374 | ;chdir = /var/www 375 | 376 | ; Redirect worker stdout and stderr into main error log. If not set, stdout and 377 | ; stderr will be redirected to /dev/null according to FastCGI specs. 378 | ; Note: on highloaded environement, this can cause some delay in the page 379 | ; process time (several ms). 380 | ; Default Value: no 381 | ;catch_workers_output = yes 382 | 383 | ; Decorate worker output with prefix and suffix containing information about 384 | ; the child that writes to the log and if stdout or stderr is used as well as 385 | ; log level and time. This options is used only if catch_workers_output is yes. 386 | ; Settings to "no" will output data as written to the stdout or stderr. 387 | ; Default value: yes 388 | ;decorate_workers_output = no 389 | 390 | ; Clear environment in FPM workers 391 | ; Prevents arbitrary environment variables from reaching FPM worker processes 392 | ; by clearing the environment in workers before env vars specified in this 393 | ; pool configuration are added. 394 | ; Setting to "no" will make all environment variables available to PHP code 395 | ; via getenv(), $_ENV and $_SERVER. 396 | ; Default Value: yes 397 | ;clear_env = no 398 | 399 | ; Limits the extensions of the main script FPM will allow to parse. This can 400 | ; prevent configuration mistakes on the web server side. You should only limit 401 | ; FPM to .php extensions to prevent malicious users to use other extensions to 402 | ; execute php code. 403 | ; Note: set an empty value to allow all extensions. 404 | ; Default Value: .php 405 | ;security.limit_extensions = .php .php3 .php4 .php5 .php7 406 | 407 | ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from 408 | ; the current environment. 409 | ; Default Value: clean env 410 | ;env[HOSTNAME] = $HOSTNAME 411 | ;env[PATH] = /usr/local/bin:/usr/bin:/bin 412 | ;env[TMP] = /tmp 413 | ;env[TMPDIR] = /tmp 414 | ;env[TEMP] = /tmp 415 | 416 | ; Additional php.ini defines, specific to this pool of workers. These settings 417 | ; overwrite the values previously defined in the php.ini. The directives are the 418 | ; same as the PHP SAPI: 419 | ; php_value/php_flag - you can set classic ini defines which can 420 | ; be overwritten from PHP call 'ini_set'. 421 | ; php_admin_value/php_admin_flag - these directives won't be overwritten by 422 | ; PHP call 'ini_set' 423 | ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. 424 | 425 | ; Defining 'extension' will load the corresponding shared extension from 426 | ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not 427 | ; overwrite previously defined php.ini values, but will append the new value 428 | ; instead. 429 | 430 | ; Note: path INI options can be relative and will be expanded with the prefix 431 | ; (pool, global or /usr) 432 | 433 | ; Default Value: nothing is defined by default except the values in php.ini and 434 | ; specified at startup with the -d argument 435 | ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com 436 | ;php_flag[display_errors] = off 437 | ;php_admin_value[error_log] = /var/log/fpm-php.www.log 438 | ;php_admin_flag[log_errors] = on 439 | ;php_admin_value[memory_limit] = 32M -------------------------------------------------------------------------------- /scrs/requirements/wordpress/tools/create_wordpress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #check if wp-config.php exist 4 | if [ -f ./wp-config.php ] 5 | then 6 | echo "wordpress already downloaded" 7 | else 8 | 9 | ####### MANDATORY PART ########## 10 | 11 | #Download wordpress and all config file 12 | wget http://wordpress.org/latest.tar.gz 13 | tar xfz latest.tar.gz 14 | mv wordpress/* . 15 | rm -rf latest.tar.gz 16 | rm -rf wordpress 17 | 18 | #Inport env variables in the config file 19 | sed -i "s/username_here/$MYSQL_USER/g" wp-config-sample.php 20 | sed -i "s/password_here/$MYSQL_PASSWORD/g" wp-config-sample.php 21 | sed -i "s/localhost/$MYSQL_HOSTNAME/g" wp-config-sample.php 22 | sed -i "s/database_name_here/$MYSQL_DATABASE/g" wp-config-sample.php 23 | cp wp-config-sample.php wp-config.php 24 | ################################### 25 | 26 | ####### BONUS PART ################ 27 | 28 | ## redis ## 29 | 30 | wp config set WP_REDIS_HOST redis --allow-root #I put --allowroot because i am on the root user on my VM 31 | wp config set WP_REDIS_PORT 6379 --raw --allow-root 32 | wp config set WP_CACHE_KEY_SALT $DOMAIN_NAME --allow-root 33 | #wp config set WP_REDIS_PASSWORD $REDIS_PASSWORD --allow-root 34 | wp config set WP_REDIS_CLIENT phpredis --allow-root 35 | wp plugin install redis-cache --activate --allow-root 36 | wp plugin update --all --allow-root 37 | wp redis enable --allow-root 38 | 39 | ### end of redis part ### 40 | 41 | ################################### 42 | fi 43 | 44 | exec "$@" --------------------------------------------------------------------------------