Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 1.71 KB

File metadata and controls

63 lines (48 loc) · 1.71 KB

This project has been created as part of the 42 curriculum by srahhali

Services

This project provides a working webserver serving a WordPress blog.

It is a LEMP (Linux, (E)NGINX, MariaDB, PHP) stack, using NGINX as the Webserver, MariaDB as the Database manager, PHP as the CGI (for Wordpress) and Linux as the host.

Starting and Stopping

To initialize, build and start the project: make all To start the services: make up To stop the services: make down To delete the docker volumes: make clean To delete and clean everything: make fclean make re is provided as a shortcut to do make down up

Accessing the website

  • Launch the project (make all)
  • Go to srahhali.42.fr if inside the Virtual Machine, go to the Virtual Machine's local IP if outside.
  • The WordPress administration panel can be accessed through the /wp-admin.php endpoint.
  • Log in.

Credential Management

Credentials are stored in srcs/.env, and without them the project will not be set up properly.

These keys need to be set up for MariaDB:

MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_ROOT_PASSWORD=

For wordpress:

DOMAIN_NAME=
WP_TITLE=
WP_ADMIN_USER=
WP_ADMIN_PASS=
WP_ADMIN_EMAIL=

WP_USER=
WP_USER_EMAIL=
WP_USER_PASS=

nginx doesn't require any environment variables or credentials for this setup.

Status and Logging

While the project is running, you can check any of the container's status by doing docker compose ps, which will show a list of the running containers and other information that might be useful. docker compose logs prints on screen the latest logs the project's containers have written. This can be used for troubleshooting.