diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..89740c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM php:7.0-apache +MAINTAINER Inti Gabriel + +RUN a2enmod rewrite +ENV APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data APACHE_LOG_DIR=/var/log/apache2 APACHE_LOCK_DIR=/var/lock/apache2 APACHE_PID_FILE=/var/run/apache2.pid + +COPY apache-config.conf /etc/apache2/sites-enabled/000-default.conf +COPY apaxy/ /var/www/html/ +RUN mv /var/www/html/htaccess.txt /var/www/html/.htaccess && \ +mv /var/www/html/theme/htaccess.txt /var/www/html/theme/.htaccess && \ +rm /var/www/html/index.html && \ +touch /var/www/html/example.gif && \ +touch /var/www/html/example.jpg && \ +touch /var/www/html/example.txt && \ +touch /var/www/html/example.md && \ +touch /var/www/html/example && \ +touch /var/www/html/example.mp4 && \ +touch /var/www/html/example.zip && \ +touch /var/www/html/example.doc && \ +touch /var/www/html/example.xls && \ +touch /var/www/html/example.pdf && \ +touch /var/www/html/example.tex && \ +touch /var/www/html/example.c && \ +touch /var/www/html/example.mp3 + +EXPOSE 80 + +CMD /usr/sbin/apache2ctl -D FOREGROUND diff --git a/README.md b/README.md index 714f615..401c88f 100644 --- a/README.md +++ b/README.md @@ -23,19 +23,16 @@ Let's assume you have a folder named `share` in your server root directory (the * [Download](https://github.com/AdamWhitcroft/Apaxy/archive/master.zip) and unzip Apaxy * Copy and paste the contents of the `/apaxy` folder to your `/share` folder. -* Edit `htaccess.txt` (now in the `/share` folder) and update all instances of paths marked with *{FOLDERNAME}* to point to your site root. - -So... - - AddIcon /{FOLDERNAME}/theme/icons/gif.png .gif - -Should be changed to... - - AddIcon /share/theme/icons/gif.png .gif - -* Once done, rename `htaccess.txt` to `.htaccess` in both the `/share` and `/share/theme` folders. +* Rename `htaccess.txt` to `.htaccess` in both the `/share` and `/share/theme` folders. * [Treat yo'self](http://25.media.tumblr.com/tumblr_lw7q28y0Mz1qanm80o1_500.gif), you're done. +##Docker iamges + +A [local Demo](http://localhost:8080) can be started with docker. +`docker-compose build` +`docker-compose up` + + ##Apaxy themes If you'd like to alter the default Apaxy theme, look in the `/theme` folder and you'll find the following files: @@ -48,15 +45,15 @@ Edit these as you would any other HTML or CSS file. Adding your own icons is a little more involved. You'll need to edit the main Apaxy `.htaccess` file. Look for the following as an example: - AddIcon /{FOLDERNAME}/theme/icons/gif.png .gif + AddIcon theme/icons/gif.png .gif -The above rule will assign an icon named `gif.png` from the directory `/{FOLDERNAME}/theme/icons/` to any file with the `.gif` extension. +The above rule will assign an icon named `gif.png` from the directory `theme/icons/` to any file with the `.gif` extension. This URL path is relative to your site's root. ##Mime Types -The default Apaxy theme `/themes/apaxy` has icons in place for the following mime types: +The default Apaxy theme `theme/apaxy` has icons in place for the following mime types: .aif .aif .asf .asx .avi .bin .c .css .csv .dmg .doc .docm .docx .dot .dotm .eps .flv .gif .htm .html .ico .iff .jar .jpeg .jpg .js .json .log .m3u .m4a .md .mid .mov .mp3 .mp4 .mpa diff --git a/apache-config.conf b/apache-config.conf new file mode 100644 index 0000000..03c2f98 --- /dev/null +++ b/apache-config.conf @@ -0,0 +1,10 @@ + + DocumentRoot /var/www/html + + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order deny,allow + Allow from all + + diff --git a/apaxy/htaccess.txt b/apaxy/htaccess.txt index a24660a..78d08a7 100644 --- a/apaxy/htaccess.txt +++ b/apaxy/htaccess.txt @@ -21,74 +21,66 @@ # GENERAL ICONS (BLANK, DIRECTORY, PARENT DIRECTORY) # -# -# Replace {FOLDERNAME} with your directory URL eg: -# If your directory is http://mywebsite.com/share/ -# you would change to: -# -# AddIcon /share/theme/icons/blank.png ^^BLANKICON^^ -# - - AddIcon /{FOLDERNAME}/theme/icons/blank.png ^^BLANKICON^^ - AddIcon /{FOLDERNAME}/theme/icons/folder.png ^^DIRECTORY^^ - AddIcon /{FOLDERNAME}/theme/icons/folder-home.png .. + AddIcon theme/icons/blank.png ^^BLANKICON^^ + AddIcon theme/icons/folder.png ^^DIRECTORY^^ + AddIcon theme/icons/folder-home.png .. - AddIconByType (TXT,/{FOLDERNAME}/theme/icons/text.png) text/* - AddIconByType (IMG,/{FOLDERNAME}/theme/icons/image.png) image/* - AddIconByType (SND,/{FOLDERNAME}/theme/icons/audio.png) audio/* - AddIconByType (VID,/{FOLDERNAME}/theme/icons/video.png) video/* + AddIconByType (TXT,theme/icons/text.png) text/* + AddIconByType (IMG,theme/icons/image.png) image/* + AddIconByType (SND,theme/icons/audio.png) audio/* + AddIconByType (VID,theme/icons/video.png) video/* # # EXTENSION SPECIFIC ICONS # - AddIcon /{FOLDERNAME}/theme/icons/archive.png .7z .bz2 .cab .gz .tar - AddIcon /{FOLDERNAME}/theme/icons/audio.png .aac .aif .aifc .aiff .ape .au .flac .iff .m4a .mid .mp3 .mpa .ra .wav .wma .f4a .f4b .oga .ogg .xm .it .s3m .mod - AddIcon /{FOLDERNAME}/theme/icons/bin.png .bin .hex - AddIcon /{FOLDERNAME}/theme/icons/bmp.png .bmp - AddIcon /{FOLDERNAME}/theme/icons/c.png .c - AddIcon /{FOLDERNAME}/theme/icons/calc.png .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv - AddIcon /{FOLDERNAME}/theme/icons/cd.png .iso - AddIcon /{FOLDERNAME}/theme/icons/cpp.png .cpp - AddIcon /{FOLDERNAME}/theme/icons/css.png .css .sass .scss - AddIcon /{FOLDERNAME}/theme/icons/deb.png .deb - AddIcon /{FOLDERNAME}/theme/icons/doc.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps - AddIcon /{FOLDERNAME}/theme/icons/draw.png .svg .svgz - AddIcon /{FOLDERNAME}/theme/icons/eps.png .ai .eps - AddIcon /{FOLDERNAME}/theme/icons/exe.png .exe - AddIcon /{FOLDERNAME}/theme/icons/gif.png .gif - AddIcon /{FOLDERNAME}/theme/icons/h.png .h - AddIcon /{FOLDERNAME}/theme/icons/html.png .html .xhtml .shtml .htm .URL .url - AddIcon /{FOLDERNAME}/theme/icons/ico.png .ico - AddIcon /{FOLDERNAME}/theme/icons/java.png .jar - AddIcon /{FOLDERNAME}/theme/icons/jpg.png .jpg .jpeg .jpe - AddIcon /{FOLDERNAME}/theme/icons/js.png .js .json - AddIcon /{FOLDERNAME}/theme/icons/markdown.png .md - AddIcon /{FOLDERNAME}/theme/icons/package.png .pkg .dmg - AddIcon /{FOLDERNAME}/theme/icons/pdf.png .pdf - AddIcon /{FOLDERNAME}/theme/icons/php.png .php .phtml - AddIcon /{FOLDERNAME}/theme/icons/playlist.png .m3u .m3u8 .pls .pls8 - AddIcon /{FOLDERNAME}/theme/icons/png.png .png - AddIcon /{FOLDERNAME}/theme/icons/ps.png .ps - AddIcon /{FOLDERNAME}/theme/icons/psd.png .psd - AddIcon /{FOLDERNAME}/theme/icons/py.png .py - AddIcon /{FOLDERNAME}/theme/icons/rar.png .rar - AddIcon /{FOLDERNAME}/theme/icons/rb.png .rb - AddIcon /{FOLDERNAME}/theme/icons/rpm.png .rpm - AddIcon /{FOLDERNAME}/theme/icons/rss.png .rss - AddIcon /{FOLDERNAME}/theme/icons/script.png .bat .cmd .sh - AddIcon /{FOLDERNAME}/theme/icons/sql.png .sql - AddIcon /{FOLDERNAME}/theme/icons/tiff.png .tiff .tif - AddIcon /{FOLDERNAME}/theme/icons/text.png .txt .nfo - AddIcon /{FOLDERNAME}/theme/icons/video.png .asf .asx .avi .flv .mkv .mov .mp4 .mpg .rm .srt .swf .vob .wmv .m4v .f4v .f4p .ogv - AddIcon /{FOLDERNAME}/theme/icons/xml.png .xml - AddIcon /{FOLDERNAME}/theme/icons/zip.png .zip - DefaultIcon /{FOLDERNAME}/theme/icons/default.png + AddIcon theme/icons/archive.png .7z .bz2 .cab .gz .tar + AddIcon theme/icons/audio.png .aac .aif .aifc .aiff .ape .au .flac .iff .m4a .mid .mp3 .mpa .ra .wav .wma .f4a .f4b .oga .ogg .xm .it .s3m .mod + AddIcon theme/icons/bin.png .bin .hex + AddIcon theme/icons/bmp.png .bmp + AddIcon theme/icons/c.png .c + AddIcon theme/icons/calc.png .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv + AddIcon theme/icons/cd.png .iso + AddIcon theme/icons/cpp.png .cpp + AddIcon theme/icons/css.png .css .sass .scss + AddIcon theme/icons/deb.png .deb + AddIcon theme/icons/doc.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps + AddIcon theme/icons/draw.png .svg .svgz + AddIcon theme/icons/eps.png .ai .eps + AddIcon theme/icons/exe.png .exe + AddIcon theme/icons/gif.png .gif + AddIcon theme/icons/h.png .h + AddIcon theme/icons/html.png .html .xhtml .shtml .htm .URL .url + AddIcon theme/icons/ico.png .ico + AddIcon theme/icons/java.png .jar + AddIcon theme/icons/jpg.png .jpg .jpeg .jpe + AddIcon theme/icons/js.png .js .json + AddIcon theme/icons/markdown.png .md + AddIcon theme/icons/package.png .pkg .dmg + AddIcon theme/icons/pdf.png .pdf + AddIcon theme/icons/php.png .php .phtml + AddIcon theme/icons/playlist.png .m3u .m3u8 .pls .pls8 + AddIcon theme/icons/png.png .png + AddIcon theme/icons/ps.png .ps + AddIcon theme/icons/psd.png .psd + AddIcon theme/icons/py.png .py + AddIcon theme/icons/rar.png .rar + AddIcon theme/icons/rb.png .rb + AddIcon theme/icons/rpm.png .rpm + AddIcon theme/icons/rss.png .rss + AddIcon theme/icons/script.png .bat .cmd .sh + AddIcon theme/icons/sql.png .sql + AddIcon theme/icons/tiff.png .tiff .tif + AddIcon theme/icons/text.png .txt .nfo + AddIcon theme/icons/video.png .asf .asx .avi .flv .mkv .mov .mp4 .mpg .rm .srt .swf .vob .wmv .m4v .f4v .f4p .ogv + AddIcon theme/icons/xml.png .xml + AddIcon theme/icons/zip.png .zip + DefaultIcon theme/icons/default.png # # THEME FILES # - HeaderName /{FOLDERNAME}/theme/header.html - ReadmeName /{FOLDERNAME}/theme/footer.html - IndexStyleSheet "/{FOLDERNAME}/theme/style.css" + HeaderName theme/header.html + ReadmeName theme/footer.html + IndexStyleSheet theme/style.css diff --git a/apaxy/theme/icons/archive.png b/apaxy/theme/icons/archive.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/audio.png b/apaxy/theme/icons/audio.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/authors.png b/apaxy/theme/icons/authors.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/bin.png b/apaxy/theme/icons/bin.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/blank.png b/apaxy/theme/icons/blank.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/bmp.png b/apaxy/theme/icons/bmp.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/c.png b/apaxy/theme/icons/c.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/calc.png b/apaxy/theme/icons/calc.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/cd.png b/apaxy/theme/icons/cd.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/copying.png b/apaxy/theme/icons/copying.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/cpp.png b/apaxy/theme/icons/cpp.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/css.png b/apaxy/theme/icons/css.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/deb.png b/apaxy/theme/icons/deb.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/default.png b/apaxy/theme/icons/default.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/diff.png b/apaxy/theme/icons/diff.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/doc.png b/apaxy/theme/icons/doc.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/draw.png b/apaxy/theme/icons/draw.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/eps.png b/apaxy/theme/icons/eps.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/exe.png b/apaxy/theme/icons/exe.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/folder-home.png b/apaxy/theme/icons/folder-home.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/folder-open.png b/apaxy/theme/icons/folder-open.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/folder-page.png b/apaxy/theme/icons/folder-page.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/folder-parent-old.png b/apaxy/theme/icons/folder-parent-old.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/folder-parent.png b/apaxy/theme/icons/folder-parent.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/folder.png b/apaxy/theme/icons/folder.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/gif.png b/apaxy/theme/icons/gif.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/gzip.png b/apaxy/theme/icons/gzip.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/h.png b/apaxy/theme/icons/h.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/hpp.png b/apaxy/theme/icons/hpp.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/html.png b/apaxy/theme/icons/html.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/ico.png b/apaxy/theme/icons/ico.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/image.png b/apaxy/theme/icons/image.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/install.png b/apaxy/theme/icons/install.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/java.png b/apaxy/theme/icons/java.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/jpg.png b/apaxy/theme/icons/jpg.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/js.png b/apaxy/theme/icons/js.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/json.png b/apaxy/theme/icons/json.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/log.png b/apaxy/theme/icons/log.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/makefile.png b/apaxy/theme/icons/makefile.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/markdown.png b/apaxy/theme/icons/markdown.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/package.png b/apaxy/theme/icons/package.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/pdf.png b/apaxy/theme/icons/pdf.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/php.png b/apaxy/theme/icons/php.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/playlist.png b/apaxy/theme/icons/playlist.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/png.png b/apaxy/theme/icons/png.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/pres.png b/apaxy/theme/icons/pres.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/ps.png b/apaxy/theme/icons/ps.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/psd.png b/apaxy/theme/icons/psd.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/py.png b/apaxy/theme/icons/py.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/rar.png b/apaxy/theme/icons/rar.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/rb.png b/apaxy/theme/icons/rb.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/readme.png b/apaxy/theme/icons/readme.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/rpm.png b/apaxy/theme/icons/rpm.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/rss.png b/apaxy/theme/icons/rss.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/rtf.png b/apaxy/theme/icons/rtf.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/script.png b/apaxy/theme/icons/script.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/source.png b/apaxy/theme/icons/source.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/sql.png b/apaxy/theme/icons/sql.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/tar.png b/apaxy/theme/icons/tar.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/tex.png b/apaxy/theme/icons/tex.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/text.png b/apaxy/theme/icons/text.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/tiff.png b/apaxy/theme/icons/tiff.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/unknown.png b/apaxy/theme/icons/unknown.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/vcal.png b/apaxy/theme/icons/vcal.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/video.png b/apaxy/theme/icons/video.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/xml.png b/apaxy/theme/icons/xml.png old mode 100755 new mode 100644 diff --git a/apaxy/theme/icons/zip.png b/apaxy/theme/icons/zip.png old mode 100755 new mode 100644 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b5fbcb3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +apaxy: + build: . + ports: + - "8080:80" +