mirror of
https://github.com/Rouji/single_php_filehost.git
synced 2025-04-10 19:08:45 +00:00
Configuration optimization
This commit is contained in:
parent
0cdce5e4ee
commit
ae70b0fb6b
23
Dockerfile
23
Dockerfile
@ -1,18 +1,12 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
RUN apk --update \
|
RUN apk --update --no-cache \
|
||||||
add lighttpd && \
|
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 \
|
|
||||||
php \
|
php \
|
||||||
php-common \
|
php-common \
|
||||||
php-cgi \
|
php-cgi \
|
||||||
php-dom && \
|
php-fileinfo
|
||||||
rm -rf /var/cache/apk/*
|
#php-dom \
|
||||||
#php-iconv \
|
#php-iconv \
|
||||||
#php-json \
|
#php-json \
|
||||||
#php-gd \
|
#php-gd \
|
||||||
@ -31,13 +25,18 @@ RUN apk --update add \
|
|||||||
#php-ldap \
|
#php-ldap \
|
||||||
#php-ctype \
|
#php-ctype \
|
||||||
|
|
||||||
|
RUN adduser www-data -G www-data -H -s /bin/false -D
|
||||||
|
|
||||||
RUN mkdir -p /run/lighttpd/ && \
|
RUN mkdir -p /run/lighttpd/ && \
|
||||||
chown www-data. /run/lighttpd/
|
chown www-data. /run/lighttpd/
|
||||||
|
RUN mkdir -p /var/www/
|
||||||
|
|
||||||
ADD lighttpd.conf /etc/lighttpd/lighttpd.conf
|
ADD lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||||
RUN mkdir -p /var/www/
|
|
||||||
ADD index.php /var/www/index.php
|
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
|
EXPOSE 80
|
||||||
|
|
||||||
|
11
Makefile
11
Makefile
@ -1,7 +1,8 @@
|
|||||||
build:
|
build:
|
||||||
mkdir -p files
|
|
||||||
docker build -t lightphp .
|
docker build -t lightphp .
|
||||||
start:
|
run:
|
||||||
sudo docker-compose up -d
|
mkdir -p files
|
||||||
stop:
|
docker run --rm -p 80:80 -v ${PWD}/files:/var/www/files lightphp
|
||||||
sudo docker-compose rm -s
|
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.username = "www-data"
|
||||||
server.groupname = "www-data"
|
server.groupname = "www-data"
|
||||||
|
|
||||||
|
include "mod_fastcgi.conf"
|
||||||
|
|
||||||
mimetype.assign = (
|
mimetype.assign = (
|
||||||
".html" => "text/html",
|
".html" => "text/html",
|
||||||
".htm" => "text/html",
|
".htm" => "text/html",
|
||||||
@ -15,10 +17,8 @@ mimetype.assign = (
|
|||||||
".ico" => "image/vnd.microsoft.icon"
|
".ico" => "image/vnd.microsoft.icon"
|
||||||
)
|
)
|
||||||
|
|
||||||
include "mod_fastcgi.conf"
|
static-file.exclude-extensions = (".php")
|
||||||
|
index-file.names = ("index.php")
|
||||||
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
|
|
||||||
index-file.names = ( "index.html", "index.htm" , "index.php")
|
|
||||||
|
|
||||||
server.modules += ( "mod_rewrite" )
|
server.modules += ( "mod_rewrite" )
|
||||||
url.rewrite = (
|
url.rewrite = (
|
||||||
|
Loading…
Reference in New Issue
Block a user