Merge pull request 'docker compose updates' (#17) from feat/docker-compose into dev

Reviewed-on: https://codeberg.org/headshed/share-lt/pulls/17
This commit is contained in:
Jon Brookes 2026-01-26 16:21:13 +01:00
commit fd43495e2d
4 changed files with 25 additions and 21 deletions

View file

@ -1,6 +1,6 @@
when:
- event: push
branch: dev
branch: feat/docker-compose-update
steps:
build-local:
image: docker:24-dind

View file

@ -2,6 +2,10 @@
Share Light CMS
[![status-badge](https://wpk.headshed.dev/api/badges/2/status.svg)](https://wpk.headshed.dev/repos/2) [![Docker Repository on Quay](https://quay.io/repository/marshyon/share-lt/status "Docker Repository on Quay")](https://quay.io/repository/marshyon/share-lt)
this project is in 'Alpha'
it is published as "R&D", open source, [GNU AFFERO GENERAL PUBLIC V3](LICENSE)

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
LARAVEL_CONTAINER_NAME="quay.io/marshyon/share-lt"
CONTAINER_LABEL="0.0.2"
CONTAINER_LABEL="0.0.3"
CACHE="--no-cache"
CACHE=""

View file

@ -1,16 +1,16 @@
#!/bin/sh
set -e
run_as_www() {
# prefer su-exec (alpine), fallback to runuser if available, otherwise run directly
if command -v su-exec >/dev/null 2>&1; then
su-exec www "$@"
elif command -v runuser >/dev/null 2>&1; then
runuser -u www -- "$@"
else
"$@"
fi
}
# run_as_www() {
# # prefer su-exec (alpine), fallback to runuser if available, otherwise run directly
# if command -v su-exec >/dev/null 2>&1; then
# su-exec www "$@"
# elif command -v runuser >/dev/null 2>&1; then
# runuser -u www -- "$@"
# else
# "$@"
# fi
# }
# Build front-end assets if Vite manifest is missing
if [ ! -f /var/www/public/build/manifest.json ]; then
@ -20,17 +20,17 @@ if [ ! -f /var/www/public/build/manifest.json ]; then
fi
# Wait for database directory to be mounted
if [ ! -f /var/www/database/database.sqlite ]; then
echo "Creating database..."
# create the sqlite file as the www user so ownership matches app files
run_as_www sh -c 'touch /var/www/database/database.sqlite'
run_as_www php artisan migrate --force
fi
# if [ ! -f /var/www/database/database.sqlite ]; then
# echo "Creating database..."
# # create the sqlite file as the www user so ownership matches app files
# run_as_www sh -c 'touch /var/www/database/database.sqlite'
# run_as_www php artisan migrate --force
# fi
# Fix storage permissions
echo "Fixing storage permissions..."
chown -R www:www /var/www/storage /var/www/bootstrap/cache
chmod -R 775 /var/www/storage /var/www/bootstrap/cache
# echo "Fixing storage permissions..."
# chown -R www:www /var/www/storage /var/www/bootstrap/cache
# chmod -R 775 /var/www/storage /var/www/bootstrap/cache
# Execute the main command
exec "$@"