diff --git a/bin/ffmpeg b/bin/ffmpeg deleted file mode 100755 index cc29f44..0000000 Binary files a/bin/ffmpeg and /dev/null differ diff --git a/docker/Dockerfile b/docker/Dockerfile index 7f9d126..8888611 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -39,7 +39,7 @@ WORKDIR /var/www ADD . /var/www/. ADD docker/rootfs/start.sh /etc/start.sh -RUN chmod +x /etc/start.sh +RUN +x /etc/start.sh # nginx stuff ADD docker/rootfs/nginx.conf /etc/nginx/http.d/default.conf @@ -59,5 +59,4 @@ VOLUME /var/www/data EXPOSE 80 -#CMD ["/bin/ash"] ENTRYPOINT ["/etc/start.sh"] \ No newline at end of file diff --git a/rtfm/INSTALL.md b/rtfm/INSTALL.md index 9f4affb..1ba1893 100644 --- a/rtfm/INSTALL.md +++ b/rtfm/INSTALL.md @@ -2,25 +2,28 @@ PictShare is written to be run on a linux server with PHP 7 and nginx. We tried to support Windows for some time but ever since we started integrating ffmpeg for MP4 hosting we ditched Windows. + It's highly recommended t hat you use [the official Docker container](https://hub.docker.com/r/hascheksolutions/pictshare) so you don't have to do any manual setup. But if you know what you're doing, you can set it up yourself. + - Make sure you have all PHP7 libraries installed (note on some systems the packages are not called php7-* but just php-* also on some systems php7-mbstring is called php7-mb): ```apt-get install php7-exif php7-gd php7-json php7-openssl php7-fileinfo php7-mbstring php7-mcrypt``` - If you are not using windows, make sure your os have the ```file``` command working: ```apt-get install file``` -- Unpack the [PictShare zip](https://github.com/chrisiaut/pictshare/archive/master.zip) +- Unpack the [PictShare zip](https://github.com/hascheksolutions/pictshare/archive/master.zip) - Rename /inc/example.config.inc.php to /inc/config.inc.php -- ```chmod +x bin/ffmpeg``` if you want to be able to use mp4 uploads - - The provided ffmpeg binary (bin/ffmpeg) is from [here](http://johnvansickle.com/ffmpeg/) and it's a 64bit linux executable. If you need a different one, load yours and overwrite the one provided or if you have ffmpeg installed on the server you can use the config var ```FFMPEG_BINARY``` to tell PictShare where to look for the binary +- If you want to be able to use mp4 uploads you need to supply your own FFMPEG binary or use the installed one on your distro useing the config var ```FFMPEG_BINARY```. For example it should point to `/usr/bin/ffmpeg` if you installed ffmpeg through your package manager - Since default upload sizes will be 2M in PHP you should edit your php.ini and change ```upload_max_filesize``` and ```post_max_size``` to a larger value -- (optional) You can and should put a [nginx](https://www.nginx.com/) proxy before the Apache server. That thing is just insanely fast with static content like images. +- (optional) You can and should use [nginx](https://www.nginx.com/) as your web server. Check [/docker/rootfs/nginx.conf] for an example on how the nginx config should look like - (optional) To secure your traffic I'd highly recommend getting an [SSL Cert](https://letsencrypt.org/) for your server if you don't already have one. ## Upgrading -- Just re-download the [PictShare zip](https://github.com/chrisiaut/pictshare/archive/master.zip) file and extract and overwrite existing pictshare files. Uploads and config won't be affected. -- Check if your ```/inc/config.inc.php``` file has all settings required by the ```/inc/example.config.inc.php``` since new options might get added in new versions +- On docker just `docker pull hascheksolutions/pictshare` and run the newer image +- Manual upgrade: + - Just re-download the [PictShare zip](https://github.com/hascheksolutions/pictshare/archive/master.zip) file and extract and overwrite existing pictshare files. Uploads and config won't be affected. + - Check if your ```/inc/config.inc.php``` file has all settings required by the ```/inc/example.config.inc.php``` since new options might get added in new versions ```bash # to be run from the directory where your pictshare directory sits in -git clone https://github.com/chrisiaut/pictshare.git temp +git clone https://github.com/hascheksolutions/pictshare.git temp cp -r temp/* pictshare/. rm -rf temp ``` diff --git a/rtfm/INTEGRATIONS.md b/rtfm/INTEGRATIONS.md index cf17c52..a88dc15 100644 --- a/rtfm/INTEGRATIONS.md +++ b/rtfm/INTEGRATIONS.md @@ -2,7 +2,7 @@ - [Pastebinit](/rtfm/PASTEBINIT.md) - Chrome Browser extension: https://chrome.google.com/webstore/detail/pictshare-1-click-imagesc/mgomffcdpnohakmlhhjmiemlolonpafc - - Source: https://github.com/chrisiaut/PictShare-Chrome-extension + - Source: https://github.com/hascheksolutions/PictShare-Chrome-extension - Plugin to upload images with ShareX: https://github.com/ShareX/CustomUploaders/blob/master/pictshare.net.sxcu # Upload from CLI diff --git a/tools/re-encode_mp4.php b/tools/re-encode_mp4.php index 9eba6d1..a541c55 100644 --- a/tools/re-encode_mp4.php +++ b/tools/re-encode_mp4.php @@ -69,9 +69,6 @@ if(in_array('altfolder',$argv) && defined('ALT_FOLDER') && ALT_FOLDER && is_dir( } } -//making sure ffmpeg is executable -system("chmod +x ".ROOT.DS.'bin'.DS.'ffmpeg'); - if(count($localfiles)==0) { echo "[i] Finding local mp4 files\n"; diff --git a/tools/render_webm_ogg.php b/tools/render_webm_ogg.php index 50dbd63..56f228c 100644 --- a/tools/render_webm_ogg.php +++ b/tools/render_webm_ogg.php @@ -34,9 +34,6 @@ if(in_array('noskip',$argv)) else $allowskipping = true; -//making sure ffmpeg is executable -system("chmod +x ".ROOT.DS.'bin'.DS.'ffmpeg'); - echo "[i] Finding local mp4 files .."; while (false !== ($filename = readdir($dh))) { $img = $dir.$filename.DS.$filename;