Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaron-22766/42_inception
Set up a Docker network with containers for nginx, mariadb, and wordpress
https://github.com/aaron-22766/42_inception
42 42-inception 42born2code 42cursus 42heilbronn 42projects 42school docker mariadb nginx wordpress
Last synced: about 1 month ago
JSON representation
Set up a Docker network with containers for nginx, mariadb, and wordpress
- Host: GitHub
- URL: https://github.com/aaron-22766/42_inception
- Owner: aaron-22766
- Created: 2023-12-04T07:32:16.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-22T12:01:28.000Z (10 months ago)
- Last Synced: 2024-02-23T11:48:14.228Z (10 months ago)
- Topics: 42, 42-inception, 42born2code, 42cursus, 42heilbronn, 42projects, 42school, docker, mariadb, nginx, wordpress
- Language: Makefile
- Homepage:
- Size: 12.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
inception
One container is not enough, we need to go deeper
---
## 🗣 About
This project aims to broaden your knowledge of system administration by using Docker. You will virtualize several Docker images, creating them in your new personal virtual machine.
## 🛠Usage
### How to run
* Have **Docker Desktop** installed and running
* Add the line `127.0.0.1 arabenst.42.fr` to `/etc/hosts` to redirect the required domain name to localhost
* be inside the root folder of the repo and run `make up` to start
* visit `arabenst.42.fr` in your browser
* run `make down` to stop### Upload wordpress backup
Because newer versions of the plugin get stuck on upload...
* visit `arabenst.42.fr/wp-admin` enter the admin login as in `srcs/.env`
* install the **All-in-One Migration Version 6.7** Wordpress plugin following [this guide](https://www.namehero.com/blog/how-to-fix-a-stuck-all-in-one-wp-migration-import/#1-2-installing-the-older-plugin-version-67)
* navigate to the plugin, select *Import* and upload the desired backup (`inception.wpress` is the website I made for the evaluation)
* visit the main page again and the changes should be applied## 💬 Description
* Three **Docker Containers** run the individual services:
* **nginx** (webserver)
* **MariaDB** (database)
* **WordPress** (content management system) and **php-fpm** (web tool for quicker website)
* Two **Docker Volumes** mount local directories for persisting files:
* WordPress database
* WordPress website files
* A **Docker Network** establishes the connection between your containers
* Each container is launched from a **Docker Image** which is built from a **Dockerfile**:
* pulls a base image (I decided to only use **Alpine**, as it's more light-weight and therefore installs quicker than **Debian**)
* installs and configures programs as required
* launches a startup-script that makes some last minute setup and runs the service
* A **docker-compose.yml** file manages everything:
* builds images from Dockerfiles (importing the .env file as the environment)
* launches containers from images
* hooks the containers up with volumes
* configures the network for the containers to communicate with each other