Compare commits
31 Commits
75689ca463
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d8dbbfd61 | |||
| dfb5fa2cd8 | |||
| dc1acafac4 | |||
| 45d79b8084 | |||
| 040e7783a8 | |||
| ce270e5168 | |||
| 471395fba7 | |||
| ae3688b166 | |||
| 1463667306 | |||
| 2c8ed95c2c | |||
| f8010a6b41 | |||
| f1e74c60fb | |||
| 9add26b186 | |||
| c0ef99a5fd | |||
| 9fd870dee8 | |||
| bbb8ab9c13 | |||
| 90f7e42416 | |||
| c45b45b796 | |||
| 74fde32a04 | |||
| 222ecd8553 | |||
| b9190e5131 | |||
| 16d5e357c0 | |||
| 03b17ef004 | |||
| 9720f10038 | |||
| 05f289eae0 | |||
| 815a551a07 | |||
| 8e677c05f3 | |||
| cca1cc8751 | |||
| 985514c51b | |||
| 63183262d4 | |||
| 2e56d220d3 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
data/
|
||||
34
README.md
34
README.md
@@ -1,30 +1,18 @@
|
||||
# Joomla
|
||||
# Joomla Setup and Helper Scripts
|
||||
|
||||
Joomla CMS.
|
||||
This repository contains a comprehensive collection of documentation, scripts, and files to assist in setting up Joomla and managing Joomla projects.
|
||||
|
||||
Make sure the projectName is set correctly, it's very important, because it's used for git, docker, mysql and joomla.
|
||||
Whether you're new to Joomla or an experienced user, this repository offers a range of resources to streamline your Joomla development workflow.
|
||||
|
||||
## Installation
|
||||
1. Clone me ```git clone git@git.nickyeoman.com:nick/joomla.git projectName```
|
||||
1. cd projectName
|
||||
1. Setup your .env file ```mv env.sample .env``` then edit with your favorite editor.
|
||||
1. Prepare your project for git ```bash bin/new_project.sh```
|
||||
1. Run the containers to initialize ```sudo bash bin/docker_up.sh```
|
||||
1. cli installer ```bash bin/setup_joomla_installer.sh```
|
||||
1. Manually set Site Meta Description in [Administrator](http://localhost:8000/administrator/index.php?option=com_config)
|
||||
1. Run ```sudo bash bin/finalize.sh```
|
||||
For detailed instructions on getting started, please refer to the [Quick Start Guide]((https://git.nickyeoman.com/nick/joomla/wiki/Quick-Start)) in the [Wiki](https://git.nickyeoman.com/nick/joomla/wiki).
|
||||
|
||||
## Working Environment
|
||||
## Table of Contents
|
||||
|
||||
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: ```joomla core:check-updates```
|
||||
* [Quick Start Guide](https://git.nickyeoman.com/nick/joomla/wiki/Quick-Start)
|
||||
* [Gitea Repository](https://git.nickyeoman.com/nick/joomla/)
|
||||
* [Wiki](https://git.nickyeoman.com/nick/joomla/wiki)
|
||||
* [Issue Tracker](https://git.nickyeoman.com/nick/joomla/issues)
|
||||
|
||||
## References
|
||||
## Contributing
|
||||
|
||||
* [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)
|
||||
* [Joomla CLI Cheatsheet](https://magazine.joomla.org/all-issues/june-2022/joomla-4-a-powerful-cli-application)
|
||||
* [Joomla Twig](https://phproberto.github.io/joomla-twig/)
|
||||
Contributions to this repository are welcome! If you find any issues, have suggestions for improvements, or want to add new features, please send me an email: joomla@nickyeoman.com or open an issue in the Issue Tracker (Which I don't check much). I appreciate your interest in this project.
|
||||
|
||||
14
bin/db-dump.bash
Normal file
14
bin/db-dump.bash
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
#check if root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This script must be run as root" 1>&2
|
||||
exit;
|
||||
fi
|
||||
|
||||
#Grab dotenv
|
||||
export $(grep -v '^#' .env | xargs)
|
||||
|
||||
tstamp=`date +%Y%m%d`
|
||||
|
||||
docker-compose exec mariadb-joomla /usr/bin/mysqldump -u ${MYSQL_USER} --password=${MYSQL_PASSWORD} ${MYSQL_DATABASE} > sql/${JOOMLA_USER}-${MYSQL_DATABASE}-${tstamp}.sql
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Are you root?
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "\033[0;31mThis script must be run as root.\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Load environment variables from .env file
|
||||
set -o allexport
|
||||
source .env
|
||||
set +o allexport
|
||||
|
||||
PROJECTNAME=$(basename "$(pwd)")
|
||||
|
||||
if [ "$DEBUG" = "true" ]; then
|
||||
docker ps
|
||||
fi
|
||||
|
||||
rm -f html/index.html
|
||||
|
||||
docker-compose up -d
|
||||
|
||||
docker-compose ps
|
||||
15
bin/file-sync.sh
Normal file
15
bin/file-sync.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
#check if root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This script must be run as root" 1>&2
|
||||
exit;
|
||||
fi
|
||||
|
||||
#Grab dotenv
|
||||
rsync -azhvc --del /var/lib/docker/volumes/harvst-ca_joomla/_data/ html/
|
||||
|
||||
# You probably should do something more like this:
|
||||
# docker create --name temp-container -v <source_volume>:/source_data busybox
|
||||
# docker cp temp-container:/source_data /path/to/destination_directory
|
||||
# docker rm temp-container
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Are you root?
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "\033[0;31mThis script must be run as root.\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROJECTNAME=$(basename "$(pwd)")
|
||||
|
||||
# Remove crap files
|
||||
rm -f html/web.config.txt
|
||||
rm -f html/htaccess.txt
|
||||
rm -f html/LICENSE.txt
|
||||
rm -f html/README.txt
|
||||
|
||||
# Set configuration.php
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set error_reporting=none
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set offset=America/Vancouver
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set sef_rewrite=true
|
||||
|
||||
# remove unused files from install
|
||||
rm -rf bin/inc_new_project
|
||||
rm -rf bin/new_project.sh
|
||||
rm -rf bin/setup_joomla_installer.sh
|
||||
|
||||
# Git
|
||||
git add .
|
||||
git commit -m"ran finalize"
|
||||
50
bin/generate_env.sh
Normal file
50
bin/generate_env.sh
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
ENV_FILE=".env"
|
||||
|
||||
# Function to generate a random alphanumeric password of a given length
|
||||
generate_password() {
|
||||
tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c "${1:-12}"
|
||||
}
|
||||
|
||||
# Function to prompt for a value if not set as a parameter
|
||||
prompt_for_value() {
|
||||
read -p "$1: " value
|
||||
echo "$value"
|
||||
}
|
||||
|
||||
# Set $PROJECTNAME if not provided as a parameter
|
||||
PROJECTNAME=${1:-$(prompt_for_value "Enter PROJECTNAME")}
|
||||
|
||||
cat <<EOF > $ENV_FILE
|
||||
# Docker
|
||||
NETWORKNAME=admin_web
|
||||
|
||||
# MySQL
|
||||
MYSQL_ROOT_PASSWORD=$(generate_password)
|
||||
MYSQL_USER=u_$(echo $PROJECTNAME | tr '[:upper:]' '[:lower:]')
|
||||
MYSQL_PASSWORD=$(generate_password)
|
||||
MYSQL_DATABASE=db_$(echo $PROJECTNAME | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# GITEA
|
||||
GITEA_API_URL=REPLACEME
|
||||
ACCESS_TOKEN=REPLACEME
|
||||
|
||||
# Joomla
|
||||
EMAIL=noreply@$(echo $PROJECTNAME | tr '[:upper:]' '[:lower:]').com
|
||||
JOOMLA_USER="$PROJECTNAME"
|
||||
JOOMLA_USERNAME=admin
|
||||
# Passwords must be 12 characters long (admin-password)
|
||||
JOOMLA_PASSWORD=$(generate_password)
|
||||
|
||||
# SMTP
|
||||
SMTP_USER=null
|
||||
SMTP_PASS=null
|
||||
SMTP_HOST='mailhog'
|
||||
SMTP_SECURITY='None'
|
||||
SMTP_PORT=1025
|
||||
EOF
|
||||
|
||||
rm $0
|
||||
|
||||
echo "Generated $ENV_FILE with randomly generated passwords and customized PROJECTNAME."
|
||||
38
bin/gitea_secrets.sh
Normal file
38
bin/gitea_secrets.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Load environment variables from .env file
|
||||
if [ -f ".env" ]; then
|
||||
set -o allexport
|
||||
source .env
|
||||
set +o allexport
|
||||
else
|
||||
echo "Error: The .env file does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
USERNAME=""
|
||||
PASSWORD=""
|
||||
|
||||
read -p "Enter your Gitea username: " USERNAME
|
||||
read -s -p "Enter your Gitea password: " PASSWORD
|
||||
echo
|
||||
|
||||
secrets_response=$(curl -s -u "$USERNAME:$PASSWORD" "$GITEA_API/repos/$REPO_OWNER/$REPO_NAME/actions/secrets")
|
||||
status_code=$(tail -c 3 <<< "$secrets_response")
|
||||
|
||||
if [[ $status_code -eq 401 ]]; then
|
||||
echo "Authentication failed. Please check your username and password."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the secret keys
|
||||
secret_keys=$(echo "$secrets_response" | jq -r '.[].name')
|
||||
|
||||
# Loop through secret keys
|
||||
for secret_key in $secret_keys; do
|
||||
secret_response=$(curl -s -u "$USERNAME:$PASSWORD" "$GITEA_API/repos/$REPO_OWNER/$REPO_NAME/actions/secrets/$secret_key")
|
||||
secret_value=$(echo "$secret_response" | jq -r '.secret')
|
||||
|
||||
# Update .env file
|
||||
sed -i "s/$secret_key=.*/$secret_key=$secret_value/" .env
|
||||
done
|
||||
@@ -1,18 +1,19 @@
|
||||
#!/bin/bash
|
||||
# This Bash script initializes a new Git repository, removes existing Git info, creates a README.md with the project name, and makes an initial commit.
|
||||
|
||||
PROJECTNAME=$(basename "$(pwd)")
|
||||
|
||||
# Remove existing Git repository information
|
||||
rm -rf .git
|
||||
rm -rf .git # Remove existing Git repository information
|
||||
|
||||
rm README.md
|
||||
# New readme for Project
|
||||
rm README.md
|
||||
touch README.md
|
||||
echo "# ${PROJECTNAME}" > README.md
|
||||
echo "" > README.md
|
||||
echo "" >> README.md
|
||||
echo "Created a fresh repo for your ${PROJECTNAME} project." >> README.md
|
||||
|
||||
# Initialize a new Git repository
|
||||
echo -e "\n\e[32mSetup Git Locally\e[0m\n";
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial commit of new project $PROJECTNAME"
|
||||
git commit -m "Initial commit of new project $PROJECTNAME"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Creates a private Git repository on Gitea using its API, adds a remote origin to the local Git repository, and pushes existing changes to the master branch.
|
||||
|
||||
PROJECTNAME=$(basename "$(pwd)")
|
||||
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Sitemap
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php extension:install --url=https://deploy.ostraining.com/client/download/free/latest-stable/com_osmap
|
||||
|
||||
# Comments
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php extension:install --url=https://cdn.akeeba.com/updates/pkgengage.xml
|
||||
#!/bin/bash
|
||||
|
||||
# Are you root?
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "\033[0;31mThis script must be run as root.\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Astroid Framework (Template)"
|
||||
# [GitHub](https://github.com/templaza/astroid-framework)
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php extension:install --url=https://github.com/templaza/astroid-framework/releases/download/v3.0.7/astroid-framework-3.0.7.zip
|
||||
|
||||
echo "OSMap (Sitemap)"
|
||||
# [GitHub](https://github.com/joomlashack/OSMap)
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php extension:install --url=https://github.com/joomlashack/OSMap/releases/download/v5.0.15/com_osmap_free_5.0.15.zip
|
||||
|
||||
echo "Akeeba Engage (Comments)"
|
||||
# [Download page](https://www.akeeba.com/download/engage/3-2-5.html)
|
||||
# [Github](https://github.com/akeeba/engage)
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php extension:install --url=https://www.akeeba.com/download/engage/3-3-3/pkg-engage-3-3-3-zip.zip
|
||||
|
||||
echo "Mavro Contact Form"
|
||||
# [GitHub](https://github.com/mavrosxristoforos/rapid-contact)
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php extension:install --url=https://github.com/mavrosxristoforos/rapid-contact/releases/download/1.4.37/mod_rapid_contact.zip
|
||||
|
||||
echo "END installing extensions"
|
||||
91
bin/joomla_cleanup.sh
Normal file
91
bin/joomla_cleanup.sh
Normal file
@@ -0,0 +1,91 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Are you root?
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "\033[0;31mThis script must be run as root.\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##################################################################
|
||||
# ENV file
|
||||
##################################################################
|
||||
# Verify the .env file exists
|
||||
if [ ! -f ".env" ]; then
|
||||
echo "Error: The .env file does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Load environment variables from .env file
|
||||
set -o allexport
|
||||
source .env
|
||||
set +o allexport
|
||||
|
||||
##################################################################
|
||||
# Variables
|
||||
##################################################################
|
||||
PROJECTNAME=$(basename "$(pwd)")
|
||||
|
||||
# Joomla Configuration Defaults
|
||||
if [ -z "$JCONFIG_REPORTING" ]; then
|
||||
JCONFIG_REPORTING='none'
|
||||
fi
|
||||
if [ -z "$JCONFIG_TIMEZONE" ]; then
|
||||
JCONFIG_TIMEZONE='America/Vancouver'
|
||||
fi
|
||||
if [ -z "$JCONFIG_SEF" ]; then
|
||||
JCONFIG_SEF=true
|
||||
fi
|
||||
# SMTP ENV CHECK
|
||||
if [ -z "$SMTP_MAILER" ]; then
|
||||
SMTP_MAILER='/usr/sbin/sendmail'
|
||||
fi
|
||||
if [ -z "$SMTP_USER" ]; then
|
||||
SMTP_USER=null
|
||||
fi
|
||||
if [ -z "$SMTP_PASS" ]; then
|
||||
SMTP_PASS=null
|
||||
fi
|
||||
if [ -n "$SMTP_PASS" ]; then
|
||||
SMTP_AUTH=true
|
||||
else
|
||||
SMTP_AUTH=false
|
||||
fi
|
||||
if [ -z "$SMTP_HOST" ]; then
|
||||
SMTP_HOST='mailhog'
|
||||
fi
|
||||
if [ -z "$SMTP_SECURITY" ]; then
|
||||
SMTP_SECURITY='None'
|
||||
fi
|
||||
if [ -z "$SMTP_PORT" ]; then
|
||||
SMTP_PORT=1025
|
||||
fi
|
||||
|
||||
# Set configuration.php
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set error_reporting="${JCONFIG_REPORTING}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set offset="${JCONFIG_TIMEZONE}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set sef_rewrite="${JCONFIG_SEF}"
|
||||
#SMTP
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set mailer=smtp
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set sendmail="${SMTP_MAILER}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set smtpuser="${SMTP_USER}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set smtppass="${SMTP_PASS}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set smtpauth="${SMTP_AUTH}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set smtphost="${SMTP_HOST}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set smtpsecure="${SMTP_SECURITY}"
|
||||
docker-compose exec -u www-data joomla php cli/joomla.php config:set smtpport="${SMTP_PORT}"
|
||||
|
||||
# Remove uneeded Joomla files
|
||||
rm -f html/web.config.txt
|
||||
rm -f html/htaccess.txt
|
||||
rm -f html/LICENSE.txt
|
||||
rm -f html/README.txt
|
||||
|
||||
# Remove Install helper scripts
|
||||
rm -rf bin/inc_new_project
|
||||
rm -rf bin/joomla_new_project.sh
|
||||
rm -rf bin/joomla_install.sh
|
||||
rm -rf bin/install_extensions.sh
|
||||
|
||||
rm $0
|
||||
|
||||
echo "Now check the results and commit them to Git"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Runs the joomla cli through docker
|
||||
|
||||
PROJECTNAME=$(basename "$(pwd)")
|
||||
|
||||
@@ -33,13 +34,13 @@ DB_PREFIX=$(LC_CTYPE=C tr -dc '[:alpha:]' < /dev/urandom | head -c 3)_
|
||||
docker-compose exec -u www-data joomla php installation/joomla.php install \
|
||||
--site-name=$PROJECTNAME \
|
||||
--admin-email=$EMAIL \
|
||||
--admin-user=$JOOMLA_USER \
|
||||
--admin-username=$JOOMLA_USER \
|
||||
--admin-user="$JOOMLA_USER" \
|
||||
--admin-username=$JOOMLA_USERNAME \
|
||||
--admin-password=$JOOMLA_PASSWORD \
|
||||
--db-type=mysqli \
|
||||
--db-host=mariadb \
|
||||
--db-host=mariadb-joomla \
|
||||
--db-user=$MYSQL_USER \
|
||||
--db-pass=$MYSQL_PASSWORD \
|
||||
--db-name=$MYSQL_DATABASE \
|
||||
--db-prefix=$DB_PREFIX \
|
||||
--db-encryption=0
|
||||
--db-encryption=0
|
||||
31
docker-compose.staging.yml
Normal file
31
docker-compose.staging.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
joomla:
|
||||
volumes:
|
||||
- ./data/development:/development
|
||||
ports:
|
||||
- "8000:80"
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest # https://hub.docker.com/_/phpmyadmin
|
||||
environment:
|
||||
PMA_USER: ${MYSQL_USER}
|
||||
PMA_PASSWORD: ${MYSQL_PASSWORD}
|
||||
PMA_HOST: mariadb-joomla
|
||||
UPLOAD_LIMIT: '200M'
|
||||
ports:
|
||||
- "8001:80"
|
||||
volumes:
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
|
||||
mailhog:
|
||||
image: 'mailhog/mailhog:latest' # https://hub.docker.com/r/mailhog/mailhog
|
||||
ports:
|
||||
- "${SMTP_PORT}:1025"
|
||||
- "8002:8025"
|
||||
volumes:
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
@@ -1,51 +1,42 @@
|
||||
version: '3.8'
|
||||
|
||||
volumes:
|
||||
joomla-db:
|
||||
joomla:
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: ${NETWORKNAME}
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.7.1 # https://hub.docker.com/_/mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
MYSQL_USER: ${MYSQL_USER}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||
volumes:
|
||||
- joomla-db:/var/lib/mysql
|
||||
|
||||
joomla:
|
||||
image: joomla:4.3.1 # https://hub.docker.com/_/joomla
|
||||
restart: always
|
||||
environment:
|
||||
JOOMLA_DB_HOST: mariadb
|
||||
JOOMLA_DB_USER: ${MYSQL_USER}
|
||||
JOOMLA_DB_PASSWORD: ${MYSQL_PASSWORD}
|
||||
JOOMLA_DB_NAME: ${MYSQL_DATABASE}
|
||||
volumes:
|
||||
- ./html:/var/www/html
|
||||
ports:
|
||||
- "8000:80"
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest # https://hub.docker.com/_/phpmyadmin
|
||||
environment:
|
||||
PMA_USER: ${MYSQL_USER}
|
||||
PMA_PASSWORD: ${MYSQL_PASSWORD}
|
||||
PMA_HOST: mariadb
|
||||
UPLOAD_LIMIT: '200M'
|
||||
ports:
|
||||
- "8001:80"
|
||||
|
||||
mailhog:
|
||||
image: 'mailhog/mailhog:latest' # https://hub.docker.com/r/mailhog/mailhog
|
||||
ports:
|
||||
- "1025:1025"
|
||||
- "8002:8025"
|
||||
version: '3.8'
|
||||
|
||||
# For Staging
|
||||
# docker-compose -f docker-compose.yml -f docker-compose.staging.yml up -d
|
||||
#
|
||||
# For Production
|
||||
# docker-compose up -d
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: ${NETWORKNAME}
|
||||
|
||||
services:
|
||||
mariadb-joomla:
|
||||
image: mariadb:11.2.2 # https://hub.docker.com/_/mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
MYSQL_USER: ${MYSQL_USER}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||
volumes:
|
||||
- ./data/joomla-db:/var/lib/mysql
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
|
||||
joomla:
|
||||
image: joomla:5.0.1 # https://hub.docker.com/_/joomla
|
||||
restart: always
|
||||
environment:
|
||||
JOOMLA_DB_HOST: mariadb-joomla
|
||||
JOOMLA_DB_USER: ${MYSQL_USER}
|
||||
JOOMLA_DB_PASSWORD: ${MYSQL_PASSWORD}
|
||||
JOOMLA_DB_NAME: ${MYSQL_DATABASE}
|
||||
volumes:
|
||||
- ./data/html:/var/www/html
|
||||
- ./php/php.ini:/usr/local/etc/php/php.ini
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
links:
|
||||
- mariadb-joomla
|
||||
|
||||
10
docs/FAQs.md
10
docs/FAQs.md
@@ -1,10 +0,0 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## How do I add user to Docker
|
||||
|
||||
Read more on [Docker's Official Post Instalation Docs](https://docs.docker.com/engine/install/linux-postinstall/)
|
||||
|
||||
```bash
|
||||
sudo usermod -aG docker $USER
|
||||
newgrp docker
|
||||
```
|
||||
18
env.sample
18
env.sample
@@ -1,18 +0,0 @@
|
||||
# Docker
|
||||
NETWORKNAME=admin_web
|
||||
|
||||
# MySQL
|
||||
MYSQL_ROOT_PASSWORD=REPLACEME
|
||||
MYSQL_USER=REPLACEME
|
||||
MYSQL_PASSWORD=REPLACEME
|
||||
MYSQL_DATABASE=REPLACEME
|
||||
|
||||
# GITEA
|
||||
GITEA_API_URL=REPLACEME
|
||||
ACCESS_TOKEN=REPLACEME
|
||||
|
||||
# Joomla
|
||||
EMAIL=noreply@example.com
|
||||
JOOMLA_USER=admin
|
||||
# Passwords must be 12 characters long
|
||||
JOOMLA_PASSWORD=REPLACEME123
|
||||
@@ -1 +0,0 @@
|
||||
<!-- Placeholder -->
|
||||
129
php/php.ini
Normal file
129
php/php.ini
Normal file
@@ -0,0 +1,129 @@
|
||||
[PHP]
|
||||
engine = On
|
||||
short_open_tag = Off
|
||||
precision = 14
|
||||
output_buffering = 4096
|
||||
zlib.output_compression = Off
|
||||
implicit_flush = Off
|
||||
unserialize_callback_func =
|
||||
serialize_precision = -1
|
||||
disable_functions =
|
||||
disable_classes =
|
||||
zend.enable_gc = On
|
||||
zend.exception_ignore_args = On
|
||||
zend.exception_string_param_max_len = 0
|
||||
expose_php = On
|
||||
max_execution_time = 30
|
||||
max_input_time = 60
|
||||
memory_limit = 128M
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
log_errors_max_len = 1024
|
||||
ignore_repeated_errors = Off
|
||||
ignore_repeated_source = Off
|
||||
report_memleaks = On
|
||||
variables_order = "GPCS"
|
||||
request_order = "GP"
|
||||
register_argc_argv = Off
|
||||
auto_globals_jit = On
|
||||
post_max_size = 800M
|
||||
auto_prepend_file =
|
||||
auto_append_file =
|
||||
default_mimetype = "text/html"
|
||||
default_charset = "UTF-8"
|
||||
doc_root =
|
||||
user_dir =
|
||||
enable_dl = Off
|
||||
file_uploads = On
|
||||
upload_max_filesize = 400M
|
||||
max_file_uploads = 20
|
||||
allow_url_fopen = On
|
||||
allow_url_include = Off
|
||||
default_socket_timeout = 60
|
||||
upload_tmp_dir = /tmp
|
||||
|
||||
[CLI Server]
|
||||
cli_server.color = On
|
||||
|
||||
[Pdo_mysql]
|
||||
pdo_mysql.default_socket=
|
||||
|
||||
[mail function]
|
||||
SMTP = localhost
|
||||
smtp_port = 25
|
||||
mail.add_x_header = Off
|
||||
|
||||
[ODBC]
|
||||
odbc.allow_persistent = On
|
||||
odbc.check_persistent = On
|
||||
odbc.max_persistent = -1
|
||||
odbc.max_links = -1
|
||||
odbc.defaultlrl = 4096
|
||||
odbc.defaultbinmode = 1
|
||||
|
||||
[MySQLi]
|
||||
mysqli.max_persistent = -1
|
||||
mysqli.allow_persistent = On
|
||||
mysqli.max_links = -1
|
||||
mysqli.default_port = 3306
|
||||
mysqli.default_socket =
|
||||
mysqli.default_host =
|
||||
mysqli.default_user =
|
||||
mysqli.default_pw =
|
||||
mysqli.reconnect = Off
|
||||
|
||||
[mysqlnd]
|
||||
mysqlnd.collect_statistics = On
|
||||
mysqlnd.collect_memory_statistics = Off
|
||||
|
||||
[PostgreSQL]
|
||||
pgsql.allow_persistent = On
|
||||
pgsql.auto_reset_persistent = Off
|
||||
pgsql.max_persistent = -1
|
||||
pgsql.max_links = -1
|
||||
pgsql.ignore_notice = 0
|
||||
pgsql.log_notice = 0
|
||||
|
||||
[bcmath]
|
||||
bcmath.scale = 0
|
||||
|
||||
[Session]
|
||||
session.save_handler = files
|
||||
session.use_strict_mode = 0
|
||||
session.use_cookies = 1
|
||||
session.use_only_cookies = 1
|
||||
session.name = PHPSESSID
|
||||
session.auto_start = 0
|
||||
session.cookie_lifetime = 0
|
||||
session.cookie_path = /
|
||||
session.cookie_domain =
|
||||
session.cookie_httponly =
|
||||
session.cookie_samesite =
|
||||
session.serialize_handler = php
|
||||
session.gc_probability = 1
|
||||
session.gc_divisor = 1000
|
||||
session.gc_maxlifetime = 1440
|
||||
session.referer_check =
|
||||
session.cache_limiter = nocache
|
||||
session.cache_expire = 180
|
||||
session.use_trans_sid = 0
|
||||
session.sid_length = 26
|
||||
session.trans_sid_tags = "a=href,area=href,frame=src,form="
|
||||
session.sid_bits_per_character = 5
|
||||
|
||||
[Assertion]
|
||||
zend.assertions = -1
|
||||
|
||||
[Tidy]
|
||||
tidy.clean_output = Off
|
||||
|
||||
[soap]
|
||||
soap.wsdl_cache_enabled=1
|
||||
soap.wsdl_cache_dir="/tmp"
|
||||
soap.wsdl_cache_ttl=86400
|
||||
soap.wsdl_cache_limit = 5
|
||||
|
||||
[ldap]
|
||||
ldap.max_links = -1
|
||||
5
sql/README.md
Normal file
5
sql/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Place MySQL Dumps Here
|
||||
|
||||
This directory is for your mysql dumps.
|
||||
Run ```sudo bash bin/db-dump.bash``` to populate from docker.
|
||||
|
||||
Reference in New Issue
Block a user