cleaned up documenation

Nick Yeoman 2023-06-07 14:06:43 -07:00
parent b65becc65a
commit 284891b04e
6 changed files with 149 additions and 46 deletions

16
Bash-Component-Helpers.md Normal file

@ -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)

50
Bash-Finalize.md Normal file

@ -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.

@ -1,45 +0,0 @@
<h1>finalize.sh Documentation</h1>
<p>The <code>finalize.sh</code> script is designed to perform finalization tasks for a Joomla project. It sets various Joomla configuration options and removes unnecessary files.</p>
<h2>Usage</h2>
<p>To use the <code>finalize.sh</code> script, follow these steps:</p>
<ol>
<li>Ensure you have root privileges to run the script.</li>
<li>Make sure the <code>.env</code> file exists in the same directory as the script.</li>
<li>Execute the script: <code>./finalize.sh</code></li>
<li>Review the results and commit the changes to Git if necessary.</li>
</ol>
<h2>Configuration</h2>
<p>The script reads configuration options from the <code>.env</code> file. Ensure that the following variables are defined:</p>
<pre><code># Joomla Configuration Defaults
JCONFIG_REPORTING=
JCONFIG_TIMEZONE=
JCONFIG_SEF=
# SMTP ENV CHECK
SMTP_MAILER=
SMTP_USER=
SMTP_PASS=
SMTP_HOST=
SMTP_SECURITY=
SMTP_PORT=</code></pre>
<h2>Script Flow</h2>
<p>The <code>finalize.sh</code> script follows the following flow:</p>
<ol>
<li>Checks if the script is run as root.</li>
<li>Verifies the existence of the <code>.env</code> file.</li>
<li>Loads the environment variables from the <code>.env</code> file.</li>
<li>Sets default values for Joomla configuration options if they are not specified in the <code>.env</code> file.</li>
<li>Sets Joomla configuration options using the <code>docker-compose</code> commands.</li>
<li>Removes unnecessary Joomla files.</li>
<li>Removes install helper scripts.</li>
<li>Displays a message to review the results and commit the changes to Git.</li>
</ol>
<h2>Important Notes</h2>
<ul>
<li>Ensure that the <code>docker-compose</code> command is properly configured and available in the environment.</li>
<li>Review the script and customize it according to your specific requirements before running it.</li>
<li>Always make backups of your files and database before running any script that modifies your Joomla installation.</li>
</ul>

28
Home.md

@ -1 +1,27 @@
Welcome to the Wiki that accommodates Nick's Joomla repository. 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/)

@ -8,3 +8,19 @@ Read more on [Docker's Official Post Instalation Docs](https://docs.docker.com/e
sudo usermod -aG docker $USER sudo usermod -aG docker $USER
newgrp docker 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
```

40
Quick-Start.md Normal file

@ -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
```