Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
awesometic committed Nov 6, 2018
0 parents commit befb076
Show file tree
Hide file tree
Showing 127 changed files with 4,080 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM apline:3.8
LABEL maintainer="Awesometic <[email protected]>" \
description="Lightweight h5ai container with Nginx & PHP 7 based on Alpine Linux."

ENV TZ=Asia/Seoul

RUN apk add --no-cache \
tzdata \
nginx php7 php7-fpm php7-json php7-xml php7-mbstring php7-intl \
php7-gd php7-imagick php7-gmagick php7-zip ffmpeg imagemagick graphicsmagick zip

RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apk del tzdata

COPY config/nginx/nginx.conf /etc/nginx/nginx.conf
COPY config/nginx/fastcgi_params /etc/nginx/fastcgi_params
COPY config/php/php_before_set_timezone.ini /etc/php7/conf.d/zzz_custom.ini
COPY _h5ai /h5ai_share

RUN chown -R nginx:nogroup /h5ai_share


21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Awesometic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
165 changes: 165 additions & 0 deletions config/_h5ai/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
## details here: https://github.com/h5bp/server-configs-apache



## SECURITY ###################################################################

DirectoryIndex disabled
FileETag None
ServerSignature Off

# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>

# Apache ≥ 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header unset ETag
Header unset X-Powered-By
</IfModule>

<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>



## COMPAT #####################################################################

AddDefaultCharset utf-8

<IfModule mod_mime.c>
AddCharset utf-8 .css .html .js .json .php .svg

AddType application/font-woff woff
AddType application/font-woff2 woff2
AddType application/json json
AddType application/javascript js
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttc ttf
AddType image/jpeg jpeg jpg
AddType image/png png
AddType image/svg+xml svg svgz
AddType image/x-icon ico
AddType font/opentype otf
AddType text/css css
AddType text/html html
</IfModule>



## SPEED ######################################################################

<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"

ExpiresByType application/json "access plus 0 seconds"

ExpiresByType text/html "access plus 1 minute"

ExpiresByType image/x-icon "access plus 1 week"

ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
</IfModule>

<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>

# Apache ≥ 2.3
<IfModule mod_authz_core.c>
# mod_filter as module only available for Apache ≥ 2.3.7
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE "application/atom+xml" \
"application/javascript" \
"application/json" \
"application/ld+json" \
"application/manifest+json" \
"application/rdf+xml" \
"application/rss+xml" \
"application/schema+json" \
"application/vnd.geo+json" \
"application/vnd.ms-fontobject" \
"application/x-font-ttf" \
"application/x-javascript" \
"application/x-web-app-manifest+json" \
"application/xhtml+xml" \
"application/xml" \
"font/eot" \
"font/opentype" \
"image/bmp" \
"image/svg+xml" \
"image/vnd.microsoft.icon" \
"image/x-icon" \
"text/cache-manifest" \
"text/css" \
"text/html" \
"text/javascript" \
"text/plain" \
"text/vcard" \
"text/vnd.rim.location.xloc" \
"text/vtt" \
"text/x-component" \
"text/x-cross-domain-policy" \
"text/xml"
</IfModule>
</IfModule>

# Apache < 2.3
<IfModule !mod_authz_core.c>
AddOutputFilterByType DEFLATE "application/atom+xml" \
"application/javascript" \
"application/json" \
"application/ld+json" \
"application/manifest+json" \
"application/rdf+xml" \
"application/rss+xml" \
"application/schema+json" \
"application/vnd.geo+json" \
"application/vnd.ms-fontobject" \
"application/x-font-ttf" \
"application/x-javascript" \
"application/x-web-app-manifest+json" \
"application/xhtml+xml" \
"application/xml" \
"font/eot" \
"font/opentype" \
"image/bmp" \
"image/svg+xml" \
"image/vnd.microsoft.icon" \
"image/x-icon" \
"text/cache-manifest" \
"text/css" \
"text/html" \
"text/javascript" \
"text/plain" \
"text/vcard" \
"text/vnd.rim.location.xloc" \
"text/vtt" \
"text/x-component" \
"text/x-cross-domain-policy" \
"text/xml"
</IfModule>

<IfModule mod_mime.c>
AddEncoding gzip gz
AddEncoding gzip svgz
</IfModule>
</IfModule>
Loading

0 comments on commit befb076

Please sign in to comment.