Compare commits
3 Commits
35e23e79d2
...
8795c78230
| Author | SHA1 | Date | |
|---|---|---|---|
|
8795c78230
|
|||
|
6ed913cbe0
|
|||
|
e952277287
|
@@ -50,7 +50,8 @@ services:
|
|||||||
- PMA_PORT=${DB_PORT:-3306}
|
- PMA_PORT=${DB_PORT:-3306}
|
||||||
- UPLOAD_LIMIT=100M
|
- UPLOAD_LIMIT=100M
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
mysql:
|
||||||
|
condition: service_started
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql-data:
|
mysql-data:
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ RUN apt-get update && apt-get install -y \
|
|||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||||
|
|
||||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
COPY ./docker/php-fpm.conf /usr/local/etc/php-fpm.d/zz-docker.conf
|
COPY ./docker/php-fpm.conf /usr/local/etc/php-fpm.d/zz-docker.conf
|
||||||
|
|
||||||
COPY ./docker/docker-entrypoint.sh /usr/local/bin/
|
COPY ./docker/docker-entrypoint.sh /usr/local/bin/
|
||||||
@@ -26,6 +25,7 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|||||||
|
|
||||||
RUN groupadd -g $GID laravel && useradd -u $UID -g $GID -m laravel
|
RUN groupadd -g $GID laravel && useradd -u $UID -g $GID -m laravel
|
||||||
USER laravel
|
USER laravel
|
||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ cd /var/www
|
|||||||
echo ">> Running in ${APP_ENV:-unknown} mode"
|
echo ">> Running in ${APP_ENV:-unknown} mode"
|
||||||
|
|
||||||
if [ -f "artisan" ]; then
|
if [ -f "artisan" ]; then
|
||||||
chown -R laravel:laravel /var/www/storage /var/www/bootstrap/cache
|
chown -R laravel:laravel storage bootstrap/cache
|
||||||
chmod -R 775 /var/www/storage /var/www/bootstrap/cache
|
chmod -R 775 storage bootstrap/cache
|
||||||
|
|
||||||
if [ ! -d "vendor" ]; then
|
if [ ! -d "vendor" ]; then
|
||||||
echo ">> Installing composer dependencies..."
|
echo ">> Installing composer dependencies..."
|
||||||
@@ -44,6 +44,7 @@ if [ -f "artisan" ]; then
|
|||||||
if [ "$APP_ENV" = "local" ]; then
|
if [ "$APP_ENV" = "local" ]; then
|
||||||
echo ">> Running seeders..."
|
echo ">> Running seeders..."
|
||||||
php artisan db:seed --force || true
|
php artisan db:seed --force || true
|
||||||
|
|
||||||
if composer show knuckleswtf/scribe > /dev/null 2>&1; then
|
if composer show knuckleswtf/scribe > /dev/null 2>&1; then
|
||||||
echo ">> Generating API documentation..."
|
echo ">> Generating API documentation..."
|
||||||
php artisan scribe:generate --no-interaction || echo ">> Documentation generation failed, continuing..."
|
php artisan scribe:generate --no-interaction || echo ">> Documentation generation failed, continuing..."
|
||||||
@@ -55,7 +56,6 @@ if [ -f "artisan" ]; then
|
|||||||
if [ "$APP_ENV" = "production" ]; then
|
if [ "$APP_ENV" = "production" ]; then
|
||||||
php artisan optimize
|
php artisan optimize
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo ">> Not a Laravel project"
|
echo ">> Not a Laravel project"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user