Added missing dependencies, fixed wrong NGINX rewrite
This commit is contained in:
parent
c0abd9decf
commit
0c0ef44420
|
@ -12,7 +12,7 @@ RUN apk --update add ca-certificates
|
|||
|
||||
# Install packages
|
||||
RUN apk --no-cache add php82 php82-fpm php82-opcache php82-openssl php82-curl php82-pdo php82-pdo_mysql php82-session \
|
||||
nginx supervisor curl unzip
|
||||
php82-mbstring php82-fileinfo php82-xml nginx supervisor curl unzip
|
||||
|
||||
# https://github.com/codecasts/php-alpine/issues/21
|
||||
#RUN ln -s /usr/bin/php7 /usr/bin/php
|
||||
|
@ -38,7 +38,7 @@ RUN mkdir -p /var/www/html
|
|||
WORKDIR /tmp
|
||||
ADD https://github.com/omeka/omeka-s/releases/download/v4.0.4/omeka-s-4.0.4.zip /tmp
|
||||
RUN unzip omeka-s-4.0.4.zip -d /var/www/html/ && rm omeka-s-4.0.4.zip
|
||||
|
||||
COPY config/database.ini /var/www/html/omeka-s/config/database.ini
|
||||
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
|
||||
RUN chown -R nobody.nobody /var/www/html && \
|
||||
chown -R nobody.nobody /run && \
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
user = "omeka"
|
||||
password = "uzu7ZoLaiGhiequi"
|
||||
dbname = "omeka"
|
||||
host = "127.0.0.1"
|
||||
port = "3306"
|
|
@ -38,53 +38,47 @@ http {
|
|||
|
||||
sendfile off;
|
||||
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
root /var/www/html/omeka-s;
|
||||
index index.php index.html index.htm;
|
||||
rewrite ^/(.*)/$ /$1 permanent;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ \..*/.*\.php$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to index.php
|
||||
try_files $uri $uri/ /index.php?q=$uri&$args;
|
||||
try_files $uri /index.php?$args;
|
||||
}
|
||||
|
||||
# Redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/lib/nginx/html;
|
||||
}
|
||||
# location /admin {
|
||||
# try_files $uri /index.php?$args;
|
||||
# }
|
||||
|
||||
# Pass the PHP scripts to PHP-FPM listening on 127.0.0.1:9000
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass unix:/run/php-fpm.sock;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
|
||||
expires 5d;
|
||||
}
|
||||
|
||||
# Deny access to . files, for security
|
||||
location ~ /\. {
|
||||
log_not_found off;
|
||||
deny all;
|
||||
}
|
||||
|
||||
# Allow fpm ping and status from localhost
|
||||
location ~ ^/(fpm-status|fpm-ping)$ {
|
||||
access_log off;
|
||||
allow 127.0.0.1;
|
||||
deny all;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass unix:/run/php-fpm.sock;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
}
|
||||
gzip on;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;
|
||||
|
|
|
@ -6,6 +6,8 @@ services:
|
|||
db:
|
||||
image: percona
|
||||
restart: always
|
||||
# environment:
|
||||
# MYSQL_ROOT_PASSWORD: example
|
||||
env_file:
|
||||
- sample.env
|
||||
ports:
|
||||
- 127.0.0.1:3306:3306
|
||||
|
||||
|
|
Loading…
Reference in New Issue