diff --git a/Bash-Component-Helpers.md b/Bash-Component-Helpers.md new file mode 100644 index 0000000..90bba51 --- /dev/null +++ b/Bash-Component-Helpers.md @@ -0,0 +1,16 @@ +## Create A Component + +1. Move to the directory where you would like to keep the component. ```cd ~/joomla-components/``` +1. Run component creator from your Joomla install. ```bash ~/projects/joomla/projectName/bin/create_component.sh``` +1. Optionally save to git repo. +1. build the zip file by running bin/build_component.sh + + +### Component Creation References + +* https://github.com/ceford/j4xdemos-com-mywalks/tree/master +* https://www.abdulwaheed.pk/en/blog/41-information-technology/44-joomla/302-how-to-create-joomla-4-component.html +* https://www.techfry.com/resources/how-to-create-joomla-component +* https://docs.joomla.org/J4.x:Developing_an_MVC_Component/Introduction + * [Develop a component](https://docs.joomla.org/J4.x:Developing_an_MVC_Component/Developing_a_Basic_Component) +* [Minimal component](https://joomla.stackexchange.com/questions/22176/minimal-basic-structure-for-a-frontend-joomla-component-without-using-joomla-mvc) \ No newline at end of file diff --git a/Bash-Finalize.md b/Bash-Finalize.md new file mode 100644 index 0000000..8d6cc61 --- /dev/null +++ b/Bash-Finalize.md @@ -0,0 +1,50 @@ +# finalize.sh Documentation + +The ```finalize.sh``` script is designed to perform finalization tasks for a Joomla project. It sets various Joomla configuration options and removes unnecessary files. + +## Usage + +To use the ```finalize.sh``` script, follow these steps: + +* Ensure you have root privileges to run the script. +* Make sure the .env file exists in the same directory as the script. +* Execute the script: ```./finalize.sh``` +* Review the results and commit the changes to Git if necessary. + +## Configuration + +The script reads configuration options from the ```.env``` file. Ensure that the following variables are defined: + +```bash +# Joomla Configuration Defaults +JCONFIG_REPORTING= +JCONFIG_TIMEZONE= +JCONFIG_SEF= +# SMTP ENV CHECK +SMTP_MAILER= +SMTP_USER= +SMTP_PASS= +SMTP_HOST= +SMTP_SECURITY= +SMTP_PORT= +``` + +## Script Flow + +The ```finalize.sh``` script follows the following flow: + +* Checks if the script is run as root. +* Verifies the existence of the ```.env``` file. +* Loads the environment variables from the ```.env``` file. +* Sets default values for Joomla configuration options if they are not specified in the ```.env``` file. +* Sets Joomla configuration options using the ```docker-compose``` commands. +* Removes unnecessary Joomla files. +* Removes install helper scripts. +* Displays a message to review the results and commit the changes to Git. + +## Important Notes + +* Ensure that the ```docker-compose``` command is properly configured and available in the environment. +* Review the script and customize it according to your specific requirements before running it. +* Always make backups of your files and database before running any script that modifies your Joomla installation. + diff --git a/Bash-Scripts---Finalize.md b/Bash-Scripts---Finalize.md deleted file mode 100644 index 1fe40f4..0000000 --- a/Bash-Scripts---Finalize.md +++ /dev/null @@ -1,45 +0,0 @@ -

finalize.sh Documentation

-

The finalize.sh script is designed to perform finalization tasks for a Joomla project. It sets various Joomla configuration options and removes unnecessary files.

- -

Usage

-

To use the finalize.sh script, follow these steps:

-
    -
  1. Ensure you have root privileges to run the script.
  2. -
  3. Make sure the .env file exists in the same directory as the script.
  4. -
  5. Execute the script: ./finalize.sh
  6. -
  7. Review the results and commit the changes to Git if necessary.
  8. -
- -

Configuration

-

The script reads configuration options from the .env file. Ensure that the following variables are defined:

-
# Joomla Configuration Defaults
-JCONFIG_REPORTING=
-JCONFIG_TIMEZONE=
-JCONFIG_SEF=
-# SMTP ENV CHECK
-SMTP_MAILER=
-SMTP_USER=
-SMTP_PASS=
-SMTP_HOST=
-SMTP_SECURITY=
-SMTP_PORT=
- -

Script Flow

-

The finalize.sh script follows the following flow:

-
    -
  1. Checks if the script is run as root.
  2. -
  3. Verifies the existence of the .env file.
  4. -
  5. Loads the environment variables from the .env file.
  6. -
  7. Sets default values for Joomla configuration options if they are not specified in the .env file.
  8. -
  9. Sets Joomla configuration options using the docker-compose commands.
  10. -
  11. Removes unnecessary Joomla files.
  12. -
  13. Removes install helper scripts.
  14. -
  15. Displays a message to review the results and commit the changes to Git.
  16. -
- -

Important Notes

- diff --git a/Home.md b/Home.md index 43c1967..f465f02 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,27 @@ -Welcome to the Wiki that accommodates Nick's Joomla repository. \ No newline at end of file +Welcome to the Wiki that accommodates Nick's Joomla repository. + +## Quick Links + +* [Gitea Public Repository](https://git.nickyeoman.com/nick/joomla) +* [Official Joomla Website](https://joomla.org/) + +## Wiki Table Of Contents + +### Getting Started + +* [Joomla Quick Start](Quick-Start.md) +### Bash scripts + +* [Finalize - configure Joomla](Bash-Finalize.md) +* [Building A Component](Bash-Component-Helpers.md) + +### Joomla Reference + +* [Joomla And Docker](Joomla-and-Docker.md) +* [Joomla CLI CheatSheet](Joomla-CLI-CheatSheet.md) + +## Various Links + +These links are for reference. + +* [Joomla Twig](https://phproberto.github.io/joomla-twig/) diff --git a/Joomla-and-Docker.md b/Joomla-and-Docker.md index 1f7c3e3..f41a509 100644 --- a/Joomla-and-Docker.md +++ b/Joomla-and-Docker.md @@ -8,3 +8,19 @@ Read more on [Docker's Official Post Instalation Docs](https://docs.docker.com/e sudo usermod -aG docker $USER newgrp docker ``` + +## Development Environment + +Let's update our bash_profile with some alias: +```bash +alias joomla='docker-compose exec -u www-data joomla php cli/joomla.php' +``` +Allowing you to just run commands like this: +```bash +joomla core:check-updates +joomla site:down +joomla extension:list +joomla update:extensions:check +joomla cache:clean + +``` \ No newline at end of file diff --git a/Quick-Start.md b/Quick-Start.md new file mode 100644 index 0000000..5e548a7 --- /dev/null +++ b/Quick-Start.md @@ -0,0 +1,40 @@ +## Getting Started, Quick Installation + +These are the quick start Joomla installation instructions. + +Make sure the projectName is set correctly, it's very important, because it's used for git, docker, mysql and joomla. + +```bash +# STEP 1 +# Clone the repo (change projectName to the name of your project) +git clone git@git.nickyeoman.com:nick/joomla.git projectName + +# STEP 2 +# Move into the dir +cd projectName + +# STEP 3 +# Setup your env file +mv env.sample .env +vi .env + +# STEP 4 +# Prepare your project for git +bash bin/new_project.sh + +# STEP 5 +# Run the containers to initialize +sudo bash bin/docker_up.sh + +# STEP 6 +# Joomla cli installer +sudo bash bin/setup_joomla_installer.sh + +# STEP 7 +# Manually set Site Meta Description in [Administrator](http://localhost:8000/administrator/index.php?option=com_config) + +# Step 8 +# Clean up and Config +sudo bash bin/finalize.sh + +``` \ No newline at end of file