This project is the first Docker project of the 42 School Common Core. This project consists in having you set up a small LEMP infrastructure composed of different services under specific rules (mariadb / wordpress / nginx).
The project must:
- follow the following structure:
srcs/
├─ requirements/
│ ├─ mariadb/
│ │ ├─ conf/
│ │ ├─ tools/
│ │ ├─ Dockerfile
│ ├─ nginx/
│ │ ├─ conf/
│ │ ├─ tools/
│ │ ├─ Dockerfile
│ ├─ wordpress/
│ │ ├─ conf/
│ │ ├─ tools/
│ │ ├─ Dockerfile
├─ .env
├─ docker-compose.yml
Makefile
- use a Makefile to set up the entire application
- use docker compose
- run each service in a dedicated container
- have nginx configured with TLSv1.2 or TLSv1.3
- only http traffic is allowed to nginx
- have two volumes (one for the database and one for wordpress)
- Clone the repository:
git clone https://github.com/RhesusP/Inception.git
- Create your
.env
file with the following variables and place it in thesrcs
directory:
DOMAIN_NAME=your_login.42.fr
# MYSQL ENV
MYSQL_DATABASE=
MYSQL_ROOT_PASSWORD=
MYSQL_USERNAME=
MYSQL_USER_PASSWORD=
# WORDPRESS ENV
WORDPRESS_WP_NAME=
WORDPRESS_ADMIN_USERNAME=
WORDPRESS_ADMIN_PASSWORD=
WORDPRESS_ADMIN_EMAIL=
WORDPRESS_USERNAME=
WORDPRESS_PASSWORD=
WORDPRESS_USER_EMAIL=
- Add the following line in your
/etc/hosts
file:
127.0.0.1 your_login.42.fr
- Start the services:
make
- Access the website at the following address:
https://your_login.42.fr