Compare commits
No commits in common. "3e4e0c83585e0f0455c8f260cff9671a2e806808" and "b1cc1cca3906c65790dda67e94b3554468c7c30f" have entirely different histories.
3e4e0c8358
...
b1cc1cca39
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
until nc -z db 3306
|
|
||||||
do
|
|
||||||
>&2 echo "mysql is unavailable - waiting"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
|
|
||||||
sudo -u www-data ../app/scripts/install.sh
|
|
||||||
apache2-foreground
|
|
|
@ -11,7 +11,7 @@ LICENSE
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
# SilverStripe auto-generated content
|
# SilverStripe auto-generated content
|
||||||
/silverstripe-cache/
|
Website/silverstripe-cache/
|
||||||
/vendor/
|
Website/vendor/
|
||||||
/resources/
|
Website/resources/
|
||||||
/public/resources/
|
Website/public/resources/
|
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -4,10 +4,3 @@ composer.phar
|
||||||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
|
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
|
||||||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
||||||
# composer.lock
|
# composer.lock
|
||||||
|
|
||||||
# SvilerStripe files
|
|
||||||
/silverstripe-cache/
|
|
||||||
/vendor/
|
|
||||||
/themes/simple/
|
|
||||||
/resources/
|
|
||||||
/public/resources/
|
|
||||||
|
|
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
|
@ -4,10 +4,10 @@
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "Lint PHP-Code",
|
"label": "Lint Website",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${workspaceFolder}"
|
"cwd": "${workspaceFolder}/Website"
|
||||||
},
|
},
|
||||||
"command": "composer",
|
"command": "composer",
|
||||||
"args": [
|
"args": [
|
||||||
|
|
16
Dockerfile
16
Dockerfile
|
@ -1,5 +1,4 @@
|
||||||
FROM php:7.2.17-apache
|
FROM php:7.1.27-apache
|
||||||
COPY .docker/nuth.sh /usr/local/bin/nuth-start
|
|
||||||
RUN chown -R www-data:www-data /var/www
|
RUN chown -R www-data:www-data /var/www
|
||||||
|
|
||||||
RUN apt update -y
|
RUN apt update -y
|
||||||
|
@ -9,8 +8,6 @@ RUN apt install --no-install-recommends -y \
|
||||||
libtidy-dev \
|
libtidy-dev \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
netcat \
|
|
||||||
rsync \
|
|
||||||
sudo \
|
sudo \
|
||||||
unzip \
|
unzip \
|
||||||
zip
|
zip
|
||||||
|
@ -36,16 +33,13 @@ RUN docker-php-ext-enable \
|
||||||
ADD https://getcomposer.org/installer composer-setup.php
|
ADD https://getcomposer.org/installer composer-setup.php
|
||||||
RUN php composer-setup.php
|
RUN php composer-setup.php
|
||||||
RUN mv composer.phar /usr/local/bin/composer
|
RUN mv composer.phar /usr/local/bin/composer
|
||||||
COPY --chown=www-data:www-data ./composer.* ./
|
COPY --chown=www-data:www-data ./Website/composer.* ./
|
||||||
RUN sudo -u www-data mkdir public
|
RUN sudo -u www-data mkdir public
|
||||||
RUN sudo -u www-data composer install
|
RUN sudo -u www-data composer install
|
||||||
RUN ./vendor/bin/sake installsake
|
|
||||||
|
COPY --chown=www-data:www-data .docker/.env .env
|
||||||
|
|
||||||
COPY .docker/xdebug.ini $PHP_INI_DIR/conf.d/
|
COPY .docker/xdebug.ini $PHP_INI_DIR/conf.d/
|
||||||
COPY .docker/date.ini $PHP_INI_DIR/conf.d/
|
COPY .docker/date.ini $PHP_INI_DIR/conf.d/
|
||||||
|
COPY --chown=www-data:www-data ./Website/ ./
|
||||||
COPY --chown=www-data:www-data .docker/.env .env
|
|
||||||
COPY --chown=www-data:www-data ./ ../app
|
|
||||||
RUN sudo -u www-data composer vendor-expose
|
RUN sudo -u www-data composer vendor-expose
|
||||||
|
|
||||||
CMD [ "nuth-start" ]
|
|
6
Website/.gitignore
vendored
Normal file
6
Website/.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
/silverstripe-cache/
|
||||||
|
/.env
|
||||||
|
/vendor/
|
||||||
|
/themes/simple/
|
||||||
|
/resources/
|
||||||
|
/public/resources/
|
0
composer.lock → Website/composer.lock
generated
0
composer.lock → Website/composer.lock
generated
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -11,8 +11,6 @@ services:
|
||||||
- nuth
|
- nuth
|
||||||
ports:
|
ports:
|
||||||
- 8000:80
|
- 8000:80
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
db:
|
db:
|
||||||
image: mysql:5
|
image: mysql:5
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -1,40 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
destinationDir=$(pwd)
|
cd $(dirname $0)
|
||||||
|
cd ..
|
||||||
tempDir=$(mktemp -d)
|
tempDir=$(mktemp -d)
|
||||||
sourceDir="."
|
sourceDir="."
|
||||||
|
|
||||||
cd $(dirname $0)
|
find $sourceDir \
|
||||||
cd ..
|
|
||||||
|
|
||||||
rsync -a --delete $sourceDir/ $tempDir
|
|
||||||
|
|
||||||
# Cleaning up the built website
|
|
||||||
find $tempDir \
|
|
||||||
-mindepth 1 -and \
|
|
||||||
-name "*" -and \
|
-name "*" -and \
|
||||||
-not \( \
|
-not \( \
|
||||||
\( \
|
\( \
|
||||||
-path "$tempDir/app" -or \
|
-path "Website"
|
||||||
-path "$tempDir/public" -or \
|
|
||||||
-path "$tempDir/themes" \
|
|
||||||
\) \
|
\) \
|
||||||
-prune \
|
-prune \
|
||||||
\) -and \
|
\) -and \
|
||||||
-not -name ".htaccess" -and \
|
|
||||||
-not -name "composer.*" \
|
|
||||||
-exec rm -rf {} +
|
|
||||||
|
|
||||||
# Cleaning up the destination directory
|
|
||||||
find $destinationDir \
|
|
||||||
-mindepth 1 -and \
|
|
||||||
-name "*" -and \
|
|
||||||
-not -name ".env" \
|
-not -name ".env" \
|
||||||
-exec rm -rf {} +
|
-print
|
||||||
|
|
||||||
# Copying the built website to the destination
|
rsync -a --delete $sourceDir $tempDir
|
||||||
rsync -a $tempDir/ $destinationDir
|
rsync -a --delete $tempDir/ .
|
||||||
|
rm -rf $tempDir
|
||||||
# Installing the website
|
|
||||||
cd $destinationDir
|
|
||||||
composer install
|
|
||||||
./vendor/bin/sake dev/build
|
|
Loading…
Reference in a new issue