Fixes, BoltCMS
All checks were successful
dockerbuild / Build docker image (push) Successful in 1m49s

This commit is contained in:
Chris 2024-02-07 13:37:27 +01:00
parent 3b6ead62b6
commit 5392cca13b
6 changed files with 56 additions and 6 deletions

View File

@ -1,3 +1,25 @@
# NoccyLabs PHP 8.3 Alpine All-in-One Base Image # NoccyLabs PHP 8.3 Alpine All-in-One Base Image
This is an AIO container done mostly right. It contains Nginx, PHP 8.3 and FPM preconfigured. It also comes with a watchdog that ensures that a failure will bring down the container, allowing for self-healing by recreating containers.
## Features
* Nginx and PHP in a single container.
* Framework detection.
* Plenty of hooks.
## Frameworks
### Symfony
Symfony projects are detected from the `symfony.lock` file.
The support will ensure that composer is installed, and that the cache directory is writable.
#### BoltCMS
BoltCMS is detected and configured by the Symfony framework support script.
### Composer
While not a frarmework, as a last resort the presence of a `composer.json` file will trigger an install.

View File

@ -41,11 +41,24 @@ case "$VARIANT" in
echo " -> Clearing cache..." echo " -> Clearing cache..."
bin/console cache:clear --env=prod -q bin/console cache:clear --env=prod -q
;; ;;
"bolt")
echo " -> Setting up BoltCMS directories..."
# we get a warning about this
chmod a+rwx /bolt/config
# we don't want to get errors from these
chmod -R a+rwx /bolt/var
chmod -R a+rwx /bolt/var/data
chmod -R a+rwx /bolt/var/cache
chmod -R a+rwx /bolt/var/cache/prod
chmod -R a+rwx /bolt/var/log
echo " -> Configuring database..."
# TODO: Apply schema and migrations
;;
esac esac
echo " -> Testing environment..." echo " -> Testing environment..."
if ! bin/console about -q; then if ! bin/console about -q; then
echo " >> Failed" echo " ** Failed **"
fi fi
exit 0 exit 0

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
echo " ** Sorry, no framework detected." echo " ** Sorry, no framework detected **"

13
templates/bolt.Dockerfile Normal file
View File

@ -0,0 +1,13 @@
#
# Dockerfile template for BoltCMS (Symfony) based projects using PHP 8.3
#
# Magic files (in /application):
#
# .nginx-site.conf Override nginx site default.conf
#
FROM dev.noccylabs.info/noccylabs/alpine-php83-aio:latest
COPY . /application
VOLUME /application/var /application/public/thumbs /application/public/files

View File

@ -3,7 +3,7 @@
# #
# Magic files (in /application): # Magic files (in /application):
# #
# .nginx-site Override nginx site default.conf # .nginx-site.conf Override nginx site default.conf
# .symfony-preinit Called before composer install # .symfony-preinit Called before composer install
# .symfony-init Called after compose install # .symfony-init Called after compose install
# #
@ -11,3 +11,5 @@
FROM dev.noccylabs.info/noccylabs/alpine-php83-aio:latest FROM dev.noccylabs.info/noccylabs/alpine-php83-aio:latest
COPY . /application COPY . /application
VOLUME /application/var