Giter Site home page Giter Site logo

42_inception's Introduction

Docker Infrastructure Project

In this project, I significantly expanded my skills in system administration by configuring a comprehensive infrastructure using Docker. I deployed multiple services in Docker containers using docker-compose, ensuring adherence to strict configuration and deployment rules.

image

Overview

Throughout this project, I achieved the following:

  • Utilized docker-compose to efficiently manage the configuration and deployment of containers.
  • Implemented custom Dockerfiles for each service, ensuring that each Docker image was built from scratch using the penultimate stable version of Alpine Linux.
  • Manually built Docker images, avoiding reliance on pre-built images from DockerHub (with the exception of Alpine).
  • Configured key services including NGINX with TLS support, WordPress with php-fpm and Redis for caching, MariaDB for database management, a pure-ftpd FTP server, a static website, and Adminer for easy database management.

Makefile Integration -- How to Run

The project utilizes a Makefile to orchestrate Docker Compose operations effectively. Below are key targets defined in the Makefile:

  • make -- Build and start containers in detached mode

  • make down -- Stop and remove containers

  • make clean -- Stop and remove containers, and also remove all images

  • make vclean -- Remove Docker volumes

  • make fclean -- Remove containers, images, and volumes

  • make prune -- Clean up unused Docker resources

Project Components

During implementation, I configured:

  • A Docker container for NGINX with exclusive support for TLSv1.2 or TLSv1.3.
  • A separate Docker environment for WordPress with php-fpm and Redis, optimized to efficiently manage site caching.
  • A Docker container for MariaDB, providing the necessary database backend for the site.
  • Dedicated volumes for storing the WordPress database and site files.
  • A Docker network to connect all services and ensure effective communication between them.
  • A pure-ftpd FTP server integrated with the WordPress site file volumes for easy file management.
  • Deployment of a simple static website to complement the environment.
  • Utilization of Adminer, a dedicated Docker container for easy management and administration of databases.

Deployment Requirements and Best Practices

To ensure robust deployment and adherence to best practices, the following guidelines have been implemented:

  • Avoidance of Latest Tag: Docker images do not utilize the latest tag to maintain consistency and stability. Instead, specific versions or stable tags are employed for all images.

  • No Passwords in Dockerfiles: Dockerfiles are configured to exclude passwords. Authentication credentials and sensitive information are managed exclusively through environment variables.

  • Mandatory Use of Environment Variables: Services are configured using environment variables. These variables encompass sensitive data such as database passwords, API keys, and configuration settings.

  • Use of .env File: Environment variables are stored in a .env file located at the root of the srcs directory. Docker Compose sources this file to provide necessary configurations across the environment.

  • NGINX as Single Entry Point: The NGINX container serves as the exclusive entry point into the infrastructure, accessible solely via port 443 (HTTPS). The server supports TLSv1.2 or TLSv1.3 protocols to ensure secure communication.

Project Achievements

  • Develop advanced skills in configuring and managing Docker containers.
  • Implement optimal practices to ensure the performance and security of deployed services.
  • Learn resource optimization and efficiency in Docker-based system management.
  • Gain comprehensive experience in setting up modern infrastructures using the latest available technologies.

42_inception's People

Contributors

leonmoreno avatar

Stargazers

Hafid Saadi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.