mirror of
https://github.com/Rouji/single_php_filehost.git
synced 2025-04-05 00:49:33 +00:00
Configuration optimization
This commit is contained in:
parent
0cdce5e4ee
commit
ae70b0fb6b
23
Dockerfile
23
Dockerfile
@ -1,18 +1,12 @@
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk --update \
|
||||
add lighttpd && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
ADD lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||
RUN adduser www-data -G www-data -H -s /bin/false -D
|
||||
|
||||
RUN apk --update add \
|
||||
RUN apk --update --no-cache \
|
||||
add lighttpd \
|
||||
php \
|
||||
php-common \
|
||||
php-cgi \
|
||||
php-dom && \
|
||||
rm -rf /var/cache/apk/*
|
||||
php-fileinfo
|
||||
#php-dom \
|
||||
#php-iconv \
|
||||
#php-json \
|
||||
#php-gd \
|
||||
@ -31,13 +25,18 @@ RUN apk --update add \
|
||||
#php-ldap \
|
||||
#php-ctype \
|
||||
|
||||
RUN adduser www-data -G www-data -H -s /bin/false -D
|
||||
|
||||
RUN mkdir -p /run/lighttpd/ && \
|
||||
chown www-data. /run/lighttpd/
|
||||
RUN mkdir -p /var/www/
|
||||
|
||||
ADD lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||
RUN mkdir -p /var/www/
|
||||
ADD index.php /var/www/index.php
|
||||
ADD php.ini /etc/php7/php.ini
|
||||
RUN sed -i 's/post_max_size[^;]*$/post_max_size = 512M/' /etc/php7/php.ini
|
||||
RUN sed -i 's/upload_max_filesize[^;]*$/upload_max_filesize = 512M/' /etc/php7/php.ini
|
||||
RUN sed -i 's/max_input_time[^;]*$/max_input_time = 300/' /etc/php7/php.ini
|
||||
RUN sed -i 's/max_execution_time[^;]*$/max_execution_time = 300/' /etc/php7/php.ini
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
11
Makefile
11
Makefile
@ -1,7 +1,8 @@
|
||||
build:
|
||||
mkdir -p files
|
||||
docker build -t lightphp .
|
||||
start:
|
||||
sudo docker-compose up -d
|
||||
stop:
|
||||
sudo docker-compose rm -s
|
||||
run:
|
||||
mkdir -p files
|
||||
docker run --rm -p 80:80 -v ${PWD}/files:/var/www/files lightphp
|
||||
rm:
|
||||
docker rmi lightphp
|
||||
rm -rf files
|
@ -1,15 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: "lightphp"
|
||||
container_name: lightphp
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./files:/var/www/files
|
||||
# OR
|
||||
#- ./www:/var/www
|
||||
#- ./lighttpd:/etc/lighttpd
|
||||
#- ./php7:/etc/php7
|
@ -5,6 +5,8 @@ server.port = 80
|
||||
server.username = "www-data"
|
||||
server.groupname = "www-data"
|
||||
|
||||
include "mod_fastcgi.conf"
|
||||
|
||||
mimetype.assign = (
|
||||
".html" => "text/html",
|
||||
".htm" => "text/html",
|
||||
@ -15,10 +17,8 @@ mimetype.assign = (
|
||||
".ico" => "image/vnd.microsoft.icon"
|
||||
)
|
||||
|
||||
include "mod_fastcgi.conf"
|
||||
|
||||
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
|
||||
index-file.names = ( "index.html", "index.htm" , "index.php")
|
||||
static-file.exclude-extensions = (".php")
|
||||
index-file.names = ("index.php")
|
||||
|
||||
server.modules += ( "mod_rewrite" )
|
||||
url.rewrite = (
|
||||
|
Loading…
Reference in New Issue
Block a user