File tree 5 files changed +40
-59
lines changed
5 files changed +40
-59
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ . idea /
Original file line number Diff line number Diff line change 1
1
FROM php:5.6-apache
2
- RUN apt-get update && apt-get install -y git zlib1g-dev && docker-php-ext-install pdo pdo_mysql mbstring zip
2
+
3
+ RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev \
4
+ && docker-php-ext-install pdo pdo_mysql mbstring zip \
5
+ && docker-php-ext-configure gd --with-freetype-dir=usr/include/ --with-jpeg-dir=/usr/include/ \
6
+ && docker-php-ext-install gd
3
7
RUN cd ~ && curl -sS https://getcomposer.org/installer | php
4
8
RUN mv ~/composer.phar /usr/local/bin/composer
5
- RUN cd /var/www/ && git clone https://github.com/ssddanbrown/BookStack.git --branch release --single-branch BookStack
9
+ RUN cd /var/www/ && git clone https://github.com/ssddanbrown/BookStack.git --branch 0.7.2 --single-branch BookStack
6
10
RUN cd /var/www/BookStack && composer install
7
- COPY .env /var/www/BookStack/.env
8
11
RUN chown -R www-data:www-data /var/www/BookStack
9
12
COPY bookstack.conf /etc/apache2/sites-enabled/bookstack.conf
10
13
RUN a2enmod rewrite
14
+
15
+ COPY docker-entrypoint.sh /
16
+ ENTRYPOINT ["/docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change
1
+ # BookStack Docker image
2
+
3
+ ## Usage with linked server
4
+
5
+ First you need to run MySQL server in Docker, and this image need link a running mysql instance container :
6
+ ```
7
+ docker run --name my-bookstack -d --link bookstack-mysql:mysql -p 8080:80 ??/bookstack
8
+ ```
9
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ if [ ! -f ' /var/www/BookStack/.env' ]; then
5
+ cp /var/www/BookStack/.env.example /var/www/BookStack/.env
6
+
7
+ if [ " $MYSQL_PORT_3306_TCP " ]; then
8
+ sed -i " s/\(DB_HOST *= *\).*/\1mysql/" ' /var/www/BookStack/.env'
9
+ sed -i " s/\(DB_DATABASE *= *\).*/\1${MYSQL_ENV_MYSQL_DATABASE:- root} /" ' /var/www/BookStack/.env'
10
+ sed -i " s/\(DB_USERNAME *= *\).*/\1${MYSQL_ENV_MYSQL_USER:- $MYSQL_ENV_MYSQL_ROOT_PASSWORD } /" ' /var/www/BookStack/.env'
11
+ sed -i " s/\(DB_PASSWORD *= *\).*/\1${MYSQL_ENV_MYSQL_PASSWORD:- bookstack} /" ' /var/www/BookStack/.env'
12
+
13
+ cd /var/www/BookStack/ && php artisan key:generate && php artisan migrate --force
14
+ else
15
+ echo >&2 ' warning: missing MYSQL_PORT_3306_TCP environment variables'
16
+ echo >&2 ' Did you forget to --link some_mysql_container:mysql ?'
17
+ exit 1
18
+ fi
19
+ fi
20
+
21
+ apache2-foreground
You can’t perform that action at this time.
0 commit comments