Skip to content

Commit

Permalink
Merge pull request #92 from FriendsOfREDAXO/schuer-recipe-custom-setup
Browse files Browse the repository at this point in the history
docs: add recipe for custom setup with pre-installed addons
  • Loading branch information
schuer authored Oct 5, 2024
2 parents a7aed55 + 29de8cc commit f77f804
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 🧁 Recipes: REDAXO with Docker

- [REDAXO + PHP 8](https://github.com/FriendsOfREDAXO/docker-redaxo/tree/main/recipes/php8) 🚀
- [REDAXO + custom setup with pre-installed addons](https://github.com/FriendsOfREDAXO/docker-redaxo/tree/main/recipes/custom-setup-with-addons) 📦
- [REDAXO + PHP 8](https://github.com/FriendsOfREDAXO/docker-redaxo/tree/main/recipes/php8)
- [REDAXO + Apache + MySQL](https://github.com/FriendsOfREDAXO/docker-redaxo/tree/main/recipes/apache-mysql)
- [REDAXO + Apache + MariaDB](https://github.com/FriendsOfREDAXO/docker-redaxo/tree/main/recipes/apache-mariadb)
- [REDAXO (FPM) + NGINX + MariaDB](https://github.com/FriendsOfREDAXO/docker-redaxo/tree/main/recipes/nginx-mariadb)
Expand Down
6 changes: 6 additions & 0 deletions recipes/custom-setup-with-addons/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM friendsofredaxo/redaxo:5

# copy custom setup script
# will be executed within the REDAXO container once the REDAXO setup was finished
COPY custom-setup.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/custom-setup.sh
7 changes: 7 additions & 0 deletions recipes/custom-setup-with-addons/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# REDAXO + custom setup with pre-installed addons

This setup demonstrates how to start up a REDAXO container with several addons already pre-installed. It makes use of a `custom-setup.sh` script that runs after REDAXO has been installed.

1. Run `docker-compose build` to build from the contained Dockerfile and custom-setup script.
2. Run `docker-compose up -d` to fire up Docker.
3. Access REDAXO in your browser at [http://localhost/redaxo](http://localhost/redaxo): Login screen should be awesome neon, and some other addons are already installed.
18 changes: 18 additions & 0 deletions recipes/custom-setup-with-addons/custom-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -euo pipefail

cd /var/www/html

php redaxo/bin/console install:download developer 3.9.2
php redaxo/bin/console package:install developer

php redaxo/bin/console install:download yform 4.2.1
php redaxo/bin/console package:install yform

php redaxo/bin/console install:download yrewrite 2.10.0
php redaxo/bin/console package:install yrewrite

php redaxo/bin/console install:download login_neon 1.0.0
php redaxo/bin/console package:install login_neon

chown -R www-data:www-data ./
33 changes: 33 additions & 0 deletions recipes/custom-setup-with-addons/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
services:

redaxo:
build: .
ports:
- 80:80
volumes:
- ./html:/var/www/html:cached
depends_on:
- db
environment:
REDAXO_SERVER: http://localhost
REDAXO_SERVERNAME: "REDAXO"
REDAXO_ERROR_EMAIL: [email protected]
REDAXO_LANG: de_de
REDAXO_TIMEZONE: Europe/London
REDAXO_DB_HOST: db
REDAXO_DB_NAME: redaxo
REDAXO_DB_LOGIN: redaxo
REDAXO_DB_PASSWORD: redaxo
REDAXO_DB_CHARSET: utf8mb4
REDAXO_ADMIN_USER: admin
REDAXO_ADMIN_PASSWORD: admin123

db:
image: mysql:8
volumes:
- ./db:/var/lib/mysql:cached
environment:
MYSQL_DATABASE: redaxo
MYSQL_USER: redaxo
MYSQL_PASSWORD: redaxo
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'

0 comments on commit f77f804

Please sign in to comment.