File tree Expand file tree Collapse file tree 4 files changed +32
-11
lines changed
Expand file tree Collapse file tree 4 files changed +32
-11
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ RUN apt-get update \
1313 php5-gd \
1414 rabbitmq-server \
1515 unzip \
16+ vim \
1617 zip \
1718 && docker-php-ext-install bcmath \
1819 && rm -rf /var/lib/apt/lists/* \
@@ -21,9 +22,10 @@ RUN apt-get update \
2122 && echo 'extension=/usr/lib/php5/20131226/gd.so' >> /usr/local/etc/php/php.ini \
2223 && echo 'extension=bcmath.so' >> /usr/local/etc/php/php.ini
2324
24- RUN git clone https://github.com/mike-jc/ImageBot.git ImageBot
25- && cd ImageBot
25+ RUN git clone https://github.com/mike-jc/ImageBot.git /home/ImageBot \
26+ && cd /home/ImageBot \
27+ && php -d memory_limit=-1 /usr/local/bin/composer install --no-interaction --no-scripts
2628
27- RUN php -d memory_limit=-1 /usr/local/bin/composer install --no-interaction --no-scripts
29+ RUN chmod 755 /home/ImageBot/bin/bot \
30+ && ln -sv /home/ImageBot/bin/bot /usr/local/bin/bot
2831
29- RUN chmod 755 bin/bot
Original file line number Diff line number Diff line change @@ -7,16 +7,35 @@ The workflow should be divided into the following independent steps:
77- Upload resized image to cloud storage.
88
99## Installation
10- Via composer:
10+
11+ #### Via composer
1112```
1213$ php composer require mike-jc/ImageBot
1314```
14- Or as a docker image:
15+
16+ #### Or as a Docker image
1517```
1618$ mkdir sandbox && cd sandbox
1719$ curl -sS https://raw.githubusercontent.com/mike-jc/ImageBot/master/Dockerfile > Dockerfile
1820$ docker build -t bots/image-bot .
19- $ docker run -it --volume=<images-directory>:/images --workdir="/images" bots/image-bot
21+ $ docker run -it --volume=<absolute-path-to-images-directory>:/images --workdir="/images" --entrypoint=/bin/bash bots/image-bot
22+ ```
23+ After that Docker container will run and you will get into it.
24+
25+ In the running docker container:
26+ ```
27+ $ vim /home/ImageBot/config/config.yml
28+
29+ ... edit configuration (at least, add cloud storage credentials)
30+
31+ $ /etc/init.d/rabbitmq-server start
32+
33+ ... now you're in images directory, so:
34+
35+ $ bot schedule ./
36+ $ bot resize
37+
38+ ... use any other bot command you want
2039```
2140
2241## Configuration
Original file line number Diff line number Diff line change 11queues :
22 host : localhost
33 port : 5672
4- user : admin
5- password : admin
4+ user : guest
5+ password : guest
66 names :
77 resize : resize
88 upload : upload
Original file line number Diff line number Diff line change 11queues:
22 host: localhost
33 port: 5672
4- user: admin
5- password: admin
4+ user: guest
5+ password: guest
66 names:
77 resize: resize
88 upload: upload
You can’t perform that action at this time.
0 commit comments