Skip to content

Latest commit

 

History

History
293 lines (211 loc) · 7.55 KB

File metadata and controls

293 lines (211 loc) · 7.55 KB

User Documentation

Overview

The Inception project is a containerized web infrastructure stack that provides a complete WordPress hosting environment with database management, file transfer capabilities, and caching services. All services run in isolated Docker containers orchestrated by Docker Compose.


Services Provided

The stack includes the following services:

1. Nginx (Web Server)

  • Reverse proxy and web server serving HTTPS (SSL/TLS encrypted)
  • Hosts static website and WordPress application
  • Listens on ports 80 (HTTP) and 443 (HTTPS)
  • Automatically redirects HTTP to HTTPS for security

2. WordPress (CMS)

  • Content management system for website creation and management
  • Database-backed application
  • Accessible through the Nginx web server
  • Requires database connectivity
  • Automatically installed and configured on first run with site, users, and performance plugins

3. MariaDB (Database)

  • Relational database server (MySQL-compatible)
  • Stores WordPress data and website content
  • Requires authentication credentials
  • Data persists in Docker volumes between restarts

4. FTP Server (vsftpd)

  • File Transfer Protocol server for uploading/downloading website files
  • Secured with SSL/TLS certificates
  • Listens on port 21 for control commands
  • Passive mode ports: 21000-21010
  • Requires FTP credentials for authentication

5. Redis

  • In-memory cache and data store
  • Improves application performance
  • Used by WordPress for caching

6. GoBackup

  • Automated backup service for database protection
  • Web-based UI for monitoring and managing backups
  • Scheduled automatic backups of WordPress database
  • Backup storage and retention management
  • Accessible via web interface on port 2703

7. Adminer

  • Web-based database management tool
  • Graphical interface for MariaDB administration
  • Allows direct database queries and data manipulation
  • Alternative to command-line database tools

Starting and Stopping the Project

Prerequisites

  • Docker and Docker Compose installed and running
  • SSL certificates generated (see Credentials and SSL Setup section)
  • Secrets files created (automatically generated on first start)

Starting the Stack

To start all services:

make up

This command:

  • Generates missing secret files (if needed)
  • Builds Docker images (if needed)
  • Starts all containers
  • Displays live logs from all services

To build without starting:

make build

Stopping the Stack

To stop all services while preserving data:

make down

This command:

  • Gracefully stops all running containers
  • Preserves volumes (database and WordPress files remain intact)
  • Does not delete data or configurations

Viewing Logs

To view live logs from running services:

make logs

Press Ctrl+C to exit the log view.

Full Rebuild

To perform a complete rebuild and restart:

make re

Accessing the Website and Administration Panels

Website Access

URL: https://lrocca.42.fr/

  • Open your web browser and navigate to the domain
  • The site uses HTTPS by default (secure connection)
  • Shows WordPress homepage with any custom content you've created

WordPress Administration Panel

URL: https://lrocca.42.fr/wp-admin/

Default Credentials (automatically configured on first run):

  • Admin User: root
  • Admin Password: See Credentials section for wordpress_root_password.txt
  • Additional User: lrocca (Contributor role, password: See Credentials section for wordpress_user_lrocca_password.txt)

Features:

  • Manage pages, posts, users, themes, and plugins
  • Configure WordPress settings

GoBackup Web UI

URL: http://localhost:2703/

  • Access the GoBackup administration interface
  • Username: lrocca (configured in backup settings)
  • Password: See Credentials section for gobackup_ui_password.txt
  • View backup history and schedule

Database Management (Adminer)

URL: https://adminer.lrocca.42.fr/

  • Alternative direct access if configured
  • Log in with database credentials:
    • Server: mariadb (hostname from Docker network)
    • Username: root or application user
    • Password: See Credentials section
    • Database: Select from available databases

Adminer Features:

  • View and edit database tables
  • Execute SQL queries
  • Export/import data
  • User and privilege management

FTP File Access

Connection Details:

  • Server: lrocca.42.fr
  • Port: 21
  • Username: ftpuser
  • Password: See Credentials section
  • Connection Type: FTPS (FTP with implicit SSL/TLS)
  • Root Directory: /home/ftpuser/ (WordPress files)

To connect using FTP client:

  1. Open your FTP client (Filezilla, WinSCP, etc.)
  2. Create a new connection with details above
  3. Set encryption to "Implicit FTPS"
  4. Browse and manage website files directly

Locating and Managing Credentials

Credentials Location

All sensitive credentials are stored in the /secrets/ directory:

secrets/
├── db_password.txt                      # WordPress database password
├── db_root_password.txt                 # MariaDB root password
├── ftp_password.txt                     # FTP user password
├── gobackup_ui_password.txt             # GoBackup web UI password
├── wordpress_root_password.txt          # WordPress admin password
└── wordpress_user_lrocca_password.txt   # WordPress user "lrocca" password

Auto-Generated Secrets

On first run, the Makefile automatically generates random credentials:

  • 12-character hexadecimal strings created using OpenSSL
  • Credentials are persistent between restarts (saved in files)
  • Each service gets its own unique password for security

Checking Service Health and Status

Quick Setup

For the following commands, it's convenient to change into the srcs directory first:

cd srcs

This way, you can run docker compose commands directly without the -f srcs/compose.yml flag.

View All Running Containers

To see which containers are running:

docker ps

Expected output should show all containers running.

View Container Status

To get detailed container information:

docker compose ps

Healthy containers show status: Up N minutes

Check Service Logs

View logs from all services:

make logs

View logs from a specific service:

docker compose logs [service_name]

Example: docker compose logs nginx

Quick Health Tests

Test Nginx/Website:

curl -k https://lrocca.42.fr/

Should return HTML content (may include warnings about self-signed certificate with -k flag).

Test Database connectivity:

docker compose exec mariadb mysql -u root -p$(cat ../secrets/db_root_password.txt) -e "SELECT 1"

Should output 1 if database is responding.

Test Redis:

docker compose exec redis redis-cli ping

Should output PONG.

Test FTP:

docker compose exec ftp ps aux | grep vsftpd

Should show vsftpd process running.

Docker Resource Usage

Monitor container resource consumption:

docker stats

Shows CPU, memory, and network usage for all containers in real-time.

View detailed container information:

docker inspect [container_name]

Example: docker inspect nginx (shows container configuration, network settings, volumes, etc.)