Skip to content

Commit bed580b

Browse files
authored
Update Dockerfile
1 parent 19e4f3c commit bed580b

1 file changed

Lines changed: 2 additions & 21 deletions

File tree

Dockerfile

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,10 @@ RUN apk add --no-cache nginx curl
55
# ایجاد پوشه‌ها
66
RUN mkdir -p /var/www/html/api /var/run/php /var/lib/nginx/tmp
77

8-
# کپی فایل‌های تونل
8+
# کپی فایل‌ها
99
COPY api/sync.php /var/www/html/api/sync.php
1010
COPY api/.htaccess /var/www/html/api/.htaccess
11-
12-
# تنظیم nginx با روش صحیح
13-
RUN cat > /etc/nginx/http.d/default.conf << 'EOF'
14-
server {
15-
listen 80 default_server;
16-
root /var/www/html;
17-
index index.php;
18-
19-
location / {
20-
try_files $uri $uri/ =404;
21-
}
22-
23-
location \~ \.php$ {
24-
fastcgi_pass unix:/var/run/php-fpm.sock;
25-
fastcgi_index index.php;
26-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
27-
include fastcgi_params;
28-
}
29-
}
30-
EOF
11+
COPY nginx.conf /etc/nginx/http.d/default.conf
3112

3213
# تنظیم مجوزها
3314
RUN chown -R www-data:www-data /var/www/html

0 commit comments

Comments
 (0)