Skip to content

Latest commit

 

History

History
84 lines (58 loc) · 2.36 KB

File metadata and controls

84 lines (58 loc) · 2.36 KB

USER DOCUMENTATION

Understand what services are provided by the stack.

NGINX

ROLE :

  • The single entrypoint of all incoming traffic

FUNCTION :

  • It handles the TLS/SSL (HTTPS) protocol. It does not process PHP code itself it "passes the torch" to PHP scripts via the FastCGI protocol.

WORDPRESS

ROLE :

  • The dynamic engine

FUNCTION :

  • PHP-FPM (FastCGI Process Manager) listens for requests sent by Nginx, executes the WordPress PHP code, and generates the final content.

MARIADB

ROLE :

  • Structured storage

FUNCTION :

  • It stores everything that isn't a "physical" file: user accounts, post content, comments, and site settings.

Start the project

    #to build or run all containers
    make 
    
    # to stop all containers
    make down

    # to stop and delete all volumes
    make clean
    
    # to remove all containers and volumes
    make fclean
       
    # to remove everything and build right after
    make re
       

Access the website and the administration panel

  • When all containers are run you can go to aroualid.42.fr.

  • As an admin user you can go to aroualid.42.fr/wp-admin to connect and do this :
    • Modify the website.
    • Create new posts.
    • Approve or disapprove comments posted by non-admin users.

  • As a non-admin user you can go to aroualid.42.fr/wp-admin and connect to this:
    • Create new posts.
    • Post comments under posts.

  • As a guest user you can go to aroualid.42.fr and :
  • Post comments under posts.

Access the database

  • To login to the database you can use the comman line sudo docker exec -it srcs-mariadb-1 mysql -u (your mariaDB username) -p and after type you mariaDB password.

  • Useful commands to navigate through the database:
    • USE database_name; — Selects the specific database you want to work with.
    • SHOW TABLES; — Lists the tables, sequences, and views in the current database.
    • SELECT * FROM wp_posts; — Displays a table of all rows and columns from the specified table. Here, we use the * wildcard to select everything from wp_posts.

Locate and manage credentials

  • To locate and manage credentials you have to modify the .env file.

Check that the services are running correctly

  • For checking the status of services you can use the Docker ps command.