Skip to content

Commit d1c2475

Browse files
authored
Update Dockerfile
1 parent bed580b commit d1c2475

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
FROM php:8.3-fpm-alpine
22

3+
# نصب nginx و curl
34
RUN apk add --no-cache nginx curl
45

5-
# ایجاد پوشه‌ها
6-
RUN mkdir -p /var/www/html/api /var/run/php /var/lib/nginx/tmp
6+
# ایجاد پوشه‌های مورد نیاز
7+
RUN mkdir -p /var/www/html/api /var/run/php /var/lib/nginx/tmp /var/log/nginx
78

8-
# کپی فایل‌ها
9+
# کپی فایل‌های پروژه
910
COPY api/sync.php /var/www/html/api/sync.php
1011
COPY api/.htaccess /var/www/html/api/.htaccess
1112
COPY nginx.conf /etc/nginx/http.d/default.conf
1213

1314
# تنظیم مجوزها
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
1517

1618
EXPOSE 80
1719

18-
# اجرای همزمان php-fpm و nginx
20+
# اجرای nginx و php-fpm
1921
CMD sh -c "php-fpm8.3 -D && nginx -g 'daemon off;'"

0 commit comments

Comments
 (0)