Skip to content

RhesusP/Inception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 22, 2024
c075cf1 Β· Mar 22, 2024

History

24 Commits
Mar 21, 2024
Jan 31, 2024
Sep 1, 2023
Dec 15, 2023
Mar 22, 2024

Repository files navigation

Inception

System Administration exercice

inception_demo.mp4

About

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).

Subject

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)

Installation

  1. Clone the repository:
git clone https://github.com/RhesusP/Inception.git
  1. Create your .env file with the following variables and place it in the srcs 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=
  1. Add the following line in your /etc/hosts file:
127.0.0.1	your_login.42.fr
  1. Start the services:
make
  1. Access the website at the following address:
https://your_login.42.fr