Update Dockerfile
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
|
@@ -1,29 +1,25 @@
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
| 3 |
-
# نصب
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
git \
|
| 6 |
-
unzip \
|
| 7 |
libcurl4-openssl-dev \
|
| 8 |
pkg-config \
|
| 9 |
libssl-dev \
|
| 10 |
&& docker-php-ext-install curl
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
RUN rm -rf /var/www/html/*
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
# این دستور توکن را از تنظیمات هاگینگ فیس میخواند بدون اینکه در کد دیده شود
|
| 18 |
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
|
| 19 |
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/Hamed744/my-tts-website.git /var/www/html/
|
| 20 |
|
| 21 |
-
|
| 22 |
-
RUN composer install --no-dev --optimize-autoloader
|
| 23 |
-
|
| 24 |
RUN chown -R www-data:www-data /var/www/html \
|
| 25 |
&& chmod -R 755 /var/www/html
|
| 26 |
|
|
|
|
| 27 |
RUN sed -i 's/80/7860/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
|
| 28 |
|
| 29 |
EXPOSE 7860
|
|
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
| 3 |
+
# نصب ابزارهای پایه و curl
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
git \
|
|
|
|
| 6 |
libcurl4-openssl-dev \
|
| 7 |
pkg-config \
|
| 8 |
libssl-dev \
|
| 9 |
&& docker-php-ext-install curl
|
| 10 |
|
| 11 |
+
# پاک کردن فایلهای پیشفرض
|
|
|
|
| 12 |
RUN rm -rf /var/www/html/*
|
| 13 |
|
| 14 |
+
# کلون کردن کدهای شما (با استفاده از توکن مخفی)
|
|
|
|
| 15 |
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
|
| 16 |
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/Hamed744/my-tts-website.git /var/www/html/
|
| 17 |
|
| 18 |
+
# تنظیم دسترسیها
|
|
|
|
|
|
|
| 19 |
RUN chown -R www-data:www-data /var/www/html \
|
| 20 |
&& chmod -R 755 /var/www/html
|
| 21 |
|
| 22 |
+
# تنظیم پورت هاگینگ فیس
|
| 23 |
RUN sed -i 's/80/7860/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
|
| 24 |
|
| 25 |
EXPOSE 7860
|