Skip to content

Development

Kipruto edited this page Feb 5, 2024 · 3 revisions

Dev Server

The development server is a simple docker container running a LAMP stack. The container is built using the docker-compose.yml file in the root of the project. The container is started using the following command:

docker-compose up --build

Before that ensure that you run the initial steps specified in the Initial Setup section.

Environment Variables

The following environment variables are used in the development server:

  • WORDPRESS_DB_HOST: The hostname of the MySQL server

  • WORDPRESS_DB_USER: The username of the MySQL user

  • WORDPRESS_DB_PASSWORD: The password of the MySQL user

  • WORDPRESS_DB_NAME: The name of the MySQL database

  • WORDPRESS_TABLE_PREFIX: The prefix for the MySQL tables

  • WP_DEBUG: Set to true to enable debugging

  • SITE_URL: The URL of the site

    The default values for these environment variables are set in the .env.example file in the root of the project. The .env file is used by the docker-compose.yml file to set the environment variables when the container is started.

    To use the default values, copy the .env.example file to .env and update the values as needed.

    cp .env.example .env

CSS

The CSS for the site is compiled from the scss files in the wp-content/themes/academyAfrica/assets/css/src directory. You can compile the CSS using the following command from the wp-content/themes/academyAfrica directory:

    pnpm css:watch

The compiled CSS is saved to the wp-content/themes/academyAfrica/assets/css/dist directory.

Clone this wiki locally