f23743adab
- Added commands to set ownership and permissions for the /var/www directory and its subdirectories, ensuring proper access for the web server. - This change improves security and functionality by configuring the environment for the Laravel application.
26 lines
623 B
Docker
26 lines
623 B
Docker
# ... mevcut kod ...
|
||
FROM php:8.1-fpm
|
||
|
||
# Gerekli uzantıları yükleyin
|
||
RUN docker-php-ext-install pdo pdo_mysql
|
||
|
||
# Composer'ı yükleyin
|
||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||
|
||
# Çalışma dizinini ayarlayın
|
||
WORKDIR /var/www
|
||
|
||
# Uygulama dosyalarını kopyalayın
|
||
COPY . .
|
||
|
||
# Bağımlılıkları yükleyin
|
||
RUN composer install
|
||
|
||
# Dosya izinlerini ayarlama
|
||
RUN chown -R www-data:www-data /var/www && \
|
||
chmod -R 755 /var/www && \
|
||
chmod -R 775 /var/www/storage && \
|
||
chmod -R 775 /var/www/storage/app/private && \
|
||
chmod -R 775 /var/www/storage/app/private/scribe
|
||
|
||
# ... mevcut kod ... |