We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bed580b commit d1c2475Copy full SHA for d1c2475
1 file changed
Dockerfile
@@ -1,19 +1,21 @@
1
FROM php:8.3-fpm-alpine
2
3
+# نصب nginx و curl
4
RUN apk add --no-cache nginx curl
5
-# ایجاد پوشهها
6
-RUN mkdir -p /var/www/html/api /var/run/php /var/lib/nginx/tmp
+# ایجاد پوشههای مورد نیاز
7
+RUN mkdir -p /var/www/html/api /var/run/php /var/lib/nginx/tmp /var/log/nginx
8
-# کپی فایلها
9
+# کپی فایلهای پروژه
10
COPY api/sync.php /var/www/html/api/sync.php
11
COPY api/.htaccess /var/www/html/api/.htaccess
12
COPY nginx.conf /etc/nginx/http.d/default.conf
13
14
# تنظیم مجوزها
-RUN chown -R www-data:www-data /var/www/html
15
+RUN chown -R www-data:www-data /var/www/html \
16
+ && chmod -R 755 /var/www/html
17
18
EXPOSE 80
19
-# اجرای همزمان php-fpm و nginx
20
+# اجرای nginx و php-fpm
21
CMD sh -c "php-fpm8.3 -D && nginx -g 'daemon off;'"
0 commit comments