Skip to content

Commit

Permalink
import of 3.3 sqlite into new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
rossriley committed Aug 29, 2017
1 parent 477c693 commit 426507a
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 3.3/sqlite/.bolt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
paths:
web: public
themebase: public/theme
files: public/files
view: public/bolt-public/view
24 changes: 24 additions & 0 deletions 3.3/sqlite/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM php:7.1-apache
MAINTAINER Ross Riley "[email protected]"

RUN apt-get update && apt-get install -y libpq-dev git libpng-dev libjpeg62-turbo-dev libfreetype6-dev wget libxrender1 libfontconfig1 libsqlite3-dev sqlite3 curl git
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install gd && \
docker-php-ext-install pdo_sqlite && \
docker-php-ext-install exif && \
docker-php-ext-install zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*


RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer

# Copy across the local files to the root directory
ADD . /var/www/html/
ADD ./server/apache-vhost.conf /etc/apache2/sites-enabled/000-default.conf
ADD ./server/php-config.ini /usr/local/etc/php/conf.d/php-config.ini
RUN chmod +x /var/www/html/start.sh
RUN cd /var/www/html && composer install

CMD ["/var/www/html/start.sh"]
3 changes: 3 additions & 0 deletions 3.3/sqlite/app/config/config_local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extensions:
composer:
minimum-stability: dev
Binary file added 3.3/sqlite/app/database/bolt.db
Binary file not shown.
27 changes: 27 additions & 0 deletions 3.3/sqlite/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "rossriley/docker-bolt",
"require": {
"bolt/bolt": "^3.3",
"doctrine/dbal": "2.5.*"
},
"authors": [
{
"name": "Ross Riley",
"email": "[email protected]"
}
],
"minimum-stability": "beta",
"prefer-stable": true,
"scripts": {
"post-install-cmd": [
"Bolt\\Composer\\ScriptHandler::installAssets"
],
"post-update-cmd": [
"Bolt\\Composer\\ScriptHandler::updateProject",
"Bolt\\Composer\\ScriptHandler::installAssets"
]
},
"extra": {
"bolt-web-dir": "./public"
}
}
Empty file added 3.3/sqlite/public/.htaccess
Empty file.
12 changes: 12 additions & 0 deletions 3.3/sqlite/public/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

/** @var Silex\Application|false $app */
$app = require __DIR__ . '/../vendor/bolt/bolt/app/web.php';

// If we're running PHP's built-in webserver, `web.php` returns `false`,
// meaning the path is a file. If so, we pass it along.
if ($app === false) {
return false;
}

$app->run();
10 changes: 10 additions & 0 deletions 3.3/sqlite/server/apache-vhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<VirtualHost *:80>
DocumentRoot /var/www/html/public
DirectoryIndex index.php

<Directory /var/www/html/public/>
Options Indexes FollowSymLinks MultiViews
Require all granted
FallbackResource /index.php
</Directory>
</VirtualHost>
3 changes: 3 additions & 0 deletions 3.3/sqlite/server/php-config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 1024M
38 changes: 38 additions & 0 deletions 3.3/sqlite/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
./vendor/bin/nut database:update;
mkdir -p ./app/cache;
mkdir -p ./app/config;
mkdir -p ./public/extensions;
mkdir -p ./public/extensions/var;
mkdir -p ./public/files;
mkdir -p ./extensions;
chmod -R 0777 ./app;
chmod -R 0777 ./public/extensions;
chmod 0777 ./public/files;
IFS=","
set -- $BOLT_EXT
for element in $@
do
echo "Installing extension $element";
eval "./vendor/bin/nut extensions:install $element";
done

if [ -n "$BOLT_THEME" ]
then
echo "Installing theme $BOLT_THEME";
eval "./vendor/bin/nut config:set theme demo";
eval "cp -prf extensions/vendor/$BOLT_THEME public/theme/demo"
eval "cp -prf extensions/vendor/$BOLT_THEME public/theme/`basename $BOLT_THEME`"
eval "cp -prf vendor/bolt/bolt/files/* public/files/"
else
echo -e "BOLT_THEME not set\n"
fi

if [ -n "$BOLT_TITLE" ]
then
eval "./vendor/bin/nut config:set sitename '$BOLT_TITLE'";
fi

chmod -R 0777 ./extensions;
rm -f /var/run/apache2/apache2.pid
exec apache2-foreground

0 comments on commit 426507a

Please sign in to comment.