Just type "docker-compose up" to install a Flex project (major refactoring)
This commit is contained in:
@@ -7,11 +7,12 @@ if [ "${1#-}" != "$1" ]; then
|
||||
fi
|
||||
|
||||
if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
|
||||
if [ "$APP_ENV" = 'prod' ]; then
|
||||
composer install --prefer-dist --no-dev --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --no-interaction
|
||||
else
|
||||
composer install --prefer-dist --no-progress --no-suggest --no-interaction
|
||||
fi
|
||||
# The first time volumes are mounted, dependencies need to be reinstalled
|
||||
if [ ! -f composer.json ]; then
|
||||
rm -Rf vendor/*
|
||||
php -r "copy('$SKELETON_COMPOSER_JSON', 'composer.json');"
|
||||
composer install --prefer-dist --no-progress --no-suggest --no-interaction
|
||||
fi
|
||||
|
||||
# Permissions hack because setfacl does not work on Mac and Windows
|
||||
chown -R www-data var
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Origin: https://github.com/composer/composer/blob/master/doc/faqs/how-to-install-composer-programmatically.md
|
||||
# Licence: MIT
|
||||
|
||||
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
|
||||
EXPECTED_SIGNATURE=$(php -r "echo trim(file_get_contents('https://composer.github.io/installer.sig'));")
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
**/*.log
|
||||
**/*.md
|
||||
**/*.sql.gz
|
||||
**/._*
|
||||
**/.DS_Store
|
||||
**/.gitignore
|
||||
**/Thumbs.db
|
||||
.dockerignore
|
||||
data/
|
||||
Dockerfile
|
||||
1
docker/db/.gitignore
vendored
1
docker/db/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
data/
|
||||
@@ -1,6 +0,0 @@
|
||||
FROM mysql:5.7
|
||||
|
||||
COPY docker-healthcheck.sh /usr/local/bin/docker-healthcheck
|
||||
RUN chmod +x /usr/local/bin/docker-healthcheck
|
||||
|
||||
HEALTHCHECK CMD ["docker-healthcheck"]
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2014-2016 Docker, Inc.
|
||||
# Origin: https://github.com/docker-library/healthcheck/blob/master/mysql/docker-healthcheck
|
||||
# Licence: MIT
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$MYSQL_RANDOM_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
|
||||
# there's no way we can guess what the random MySQL password was
|
||||
echo >&2 'healthcheck error: cannot determine random root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="$(hostname --ip-address || echo '127.0.0.1')"
|
||||
user="${MYSQL_USER:-root}"
|
||||
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
|
||||
|
||||
args=(
|
||||
# force mysql to not use the local "mysqld.sock" (test "external" connectibility)
|
||||
-h"$host"
|
||||
-u"$user"
|
||||
--silent
|
||||
)
|
||||
|
||||
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
@@ -1,8 +0,0 @@
|
||||
**/*.log
|
||||
**/*.md
|
||||
**/._*
|
||||
**/.DS_Store
|
||||
**/.gitignore
|
||||
**/Thumbs.db
|
||||
.dockerignore
|
||||
Dockerfile
|
||||
@@ -1,3 +0,0 @@
|
||||
FROM nginx:1.13-alpine
|
||||
|
||||
COPY conf.d /etc/nginx/conf.d/
|
||||
@@ -1,9 +1,9 @@
|
||||
server {
|
||||
root /srv/app/web;
|
||||
root /srv/app/public;
|
||||
resolver 127.0.0.11;
|
||||
|
||||
location / {
|
||||
# try to serve file directly, fallback to app.php
|
||||
# try to serve file directly, fallback to index.php
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
location ~ ^/index\.php(/|$) {
|
||||
@@ -20,7 +20,7 @@ server {
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
# Prevents URIs that include the front controller. This will 404:
|
||||
# http://domain.tld/app.php/some-path
|
||||
# http://domain.tld/index.php/some-path
|
||||
# Remove the internal directive to allow URIs like this
|
||||
internal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user