webhook
This commit is contained in:
@@ -19,7 +19,14 @@ RUN apt-get update && apt-get install -y \
|
||||
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
COPY docker/php-apache/vhost.conf /etc/apache2/sites-available/000-default.conf
|
||||
COPY docker/php-apache/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
# Buang CR (kalau fail di-checkout dengan line ending Windows) dan jadikan executable
|
||||
RUN sed -i 's/\r$//' /usr/local/bin/entrypoint.sh \
|
||||
&& chmod +x /usr/local/bin/entrypoint.sh \
|
||||
&& chown -R www-data:www-data /var/www/html
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
17
docker/php-apache/entrypoint.sh
Normal file
17
docker/php-apache/entrypoint.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Bind mount (./src:/var/www/html) menindih ownership dari image, jadi kita
|
||||
# betulkan permission storage setiap kali container start — bukan masa build.
|
||||
mkdir -p \
|
||||
storage/framework/cache/laravel-excel \
|
||||
storage/framework/sessions \
|
||||
storage/framework/views \
|
||||
storage/logs \
|
||||
bootstrap/cache
|
||||
|
||||
chown -R www-data:www-data storage bootstrap/cache
|
||||
chmod -R 775 storage bootstrap/cache
|
||||
|
||||
# Jalankan arahan utama container (apache2-foreground)
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user