Setting a complete Web app (Nginx, wordpress+php-fpm, MariaDB) in Docker, each service in its own Container.
- What is Inception ?
- What topics I need to know about Docker ?
- What Technologies are used ?
- How the web app's architecture will look like ?
- How to run the Project ?
- How can I change the database's password ?
- Where the database and website's files are stored ?
- How can I configure each Service ?
Inception is a 42 project, that aims to broaden student's knowledge about the world of Docker and containerization.
- Dockerfile
- docker-compose
- Docker Networks
- Docker Volumes
- Docker Images
- Docker Containers
- Docker Environment Variables
- Containerization : Docker
- Web server : Nginx
- CMS : Wordpress
- Backend Programming Language : php
- Database Server : MariaDB
Each service will have its own container (Nginx, Wordpress+php, MariaDB). Services will communicate between each other in a local Docker Network, and only the port 443 of the Nginx service will be exposed to the Internet.
- Clone the repositery:
git clone https://gitlab.com/inception-42
- Change the working directory:
cd inception-42
- Make sure that you are running dockerd, if not run it by the following command:
service docker start
- Run make:
make
It will take few minutes first time to build images and download necessary packages. - Then you are ready to start setting up your wordpress website, by checking your localhost in your browser.
https://localhost
You can configure them and change the default ones, from .env file in the root of the repositery. By changing, the values of each environment variable.
By default, they are stored in this directory /home/anaouadi/data/
There are two different subdirectories:
- wordpress : website's files
- db : database
Thanks to Docker volumes, even after stoping your web app or a service, your data will persist and you can always check it and move it from your host machine or make backups.
Each service is already configured and customized so it will work smoothly, but if you want to change any configuration, you check the README.md of the service that you want in /inception/srcs/requirements/service/README.md