Skip to content

Sleleu/inception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

inception

A project to get familiar with docker

Subject

This project consists in building an architecture composed of containers and volumes in order to build a wordpress site using mariadb as a database, and nginx as a web server.

The following installations must be performed :

  • A Docker container that contains NGINX with TLSv1.2 or TLSv1.3 only.
  • A Docker container that contains WordPress + php-fpm (it must be installed and configured) only without nginx.
  • A Docker container that contains MariaDB only without nginx.
  • A volume that contains your WordPress database.
  • A second volume that contains your WordPress website files.
  • A docker-network that establishes the connection between your containers.

Here is an example diagram of the final result provided by the subject :

Screenshot from 2023-01-30 16-59-21

Installation

git clone git@github.com:Sleleu/inception.git
cd inception
make

It's possible to change the identifiers and characteristics of the site from a .env file, established by default with random identifiers for this project

Usefull commands

  • Basic commands
docker compose up -d # Build all containers with docker compose, and launch services in background
docker compose down # Desactivate containers
docker build -t <name> <path> # Build a single container with a defined name and path
docker exec -it <name> bash # To navigate in the started container
docker stop <ID> # Stop a container
docker rm <ID> # Remove a container
docker ps -a # See containers
docker volume ls # See volumes
  • suppression commands
docker system prune -a # Remove containers, networks, images
docker volume rm $(docker volume ls -q) # Remove volumes

Ressources :