-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.nginx
26 lines (24 loc) · 895 Bytes
/
Dockerfile.nginx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM nginx:1.15.6-alpine
RUN { \
echo 'server {';\
echo 'listen 80;';\
echo 'root /var/www/html/public;'; \
echo 'index index.php index.html;'; \
echo 'error_log /var/log/nginx/error.log;'; \
echo 'access_log /var/log/nginx/access.log;';\
echo 'location ~ \.php$ {';\
echo 'try_files $uri =404;';\
echo 'fastcgi_split_path_info ^(.+\.php)(/.+)$;';\
echo 'fastcgi_pass laravel:9000;';\
echo 'fastcgi_index index.php;';\
echo 'include fastcgi_params;';\
echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;';\
echo 'fastcgi_param PATH_INFO $fastcgi_path_info;';\
echo '}';\
echo 'location / {';\
echo 'try_files $uri $uri/ /index.php?$query_string;';\
echo 'gzip_static on;';\
echo '}';\
echo '}';\
} > /etc/nginx/conf.d/default.conf
COPY public /var/www/html/public