Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_NAME=Laravel
APP_NAME=Salas
APP_ENV=local
APP_KEY=
APP_DEBUG=true
Expand Down
65 changes: 10 additions & 55 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,60 +1,15 @@
FROM php:8.3-apache
FROM uspdev/uspdev-php-apache:8.3

# packages
RUN sed -i 's|main|main non-free|' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y \
unixodbc \
unixodbc-dev \
freetds-bin \
freetds-dev \
libicu-dev \
git \
unzip \
libzip-dev \
libpng-dev \
libonig-dev \
libxml2-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
curl
RUN sed -i 's|/var/www/html|/var/www/html/public|' \
/etc/apache2/sites-available/000-default.conf

# cleanup
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# php libs
RUN docker-php-ext-install \
intl \
pdo_mysql \
soap \
zip \
mbstring \
bcmath \
pdo_dblib

# gd
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
docker-php-ext-install gd

# php memory
ENV PHP_MEMORY_LIMIT=512M
ENV PHP_UPLOAD_LIMIT=512M
RUN { \
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > "${PHP_INI_DIR}/conf.d/upload.ini"

# apache
RUN a2enmod rewrite
RUN sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf

# composer
USER www-data

COPY --chown=www-data . .
RUN composer install --optimize-autoloader --no-interaction

CMD ["./serve.sh"]
RUN composer install \
--no-dev \
--optimize-autoloader \
--no-interaction

CMD ["apache2-foreground"]
60 changes: 60 additions & 0 deletions Dockerfile-old
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FROM php:8.3-apache

# packages
RUN sed -i 's|main|main non-free|' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y \
unixodbc \
unixodbc-dev \
freetds-bin \
freetds-dev \
libicu-dev \
git \
unzip \
libzip-dev \
libpng-dev \
libonig-dev \
libxml2-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
curl

# cleanup
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# php libs
RUN docker-php-ext-install \
intl \
pdo_mysql \
soap \
zip \
mbstring \
bcmath \
pdo_dblib

# gd
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
docker-php-ext-install gd

# php memory
ENV PHP_MEMORY_LIMIT=512M
ENV PHP_UPLOAD_LIMIT=512M
RUN { \
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > "${PHP_INI_DIR}/conf.d/upload.ini"

# apache
RUN a2enmod rewrite
RUN sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf

# composer
USER www-data
COPY --chown=www-data . .
RUN composer install --optimize-autoloader --no-interaction

CMD ["./serve.sh"]
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"uspdev/senhaunica-socialite": "^4.3"
},
"require-dev": {
"spatie/laravel-ignition": "^2.4",
"fakerphp/faker": "^1.9.1",
"laravel/dusk": "^8.0",
"laravel/dusk": "^8.6",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^11.0"
"phpunit/phpunit": "^11.0",
"spatie/laravel-ignition": "^2.4"
},
"config": {
"optimize-autoloader": true,
Expand Down Expand Up @@ -62,8 +62,7 @@
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan vendor:publish --provider=\"Uspdev\\UspTheme\\ServiceProvider\" --tag=assets --force",
"@php artisan dusk:chrome-driver --detect"
"@php artisan vendor:publish --provider=\"Uspdev\\UspTheme\\ServiceProvider\" --tag=assets --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
Expand Down
Loading