Skip to content

Commit

Permalink
Merge branch 'master' into 139-restrict-by-ip
Browse files Browse the repository at this point in the history
  • Loading branch information
fureigh authored Sep 26, 2018
2 parents cc393a4 + 8d717ed commit 0c41f13
Show file tree
Hide file tree
Showing 2,740 changed files with 36,273 additions and 194,639 deletions.
25 changes: 25 additions & 0 deletions .bp-config/httpd/extra/httpd-modules.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file was built from
# https://github.com/cloudfoundry/php-buildpack/blob/master/defaults/config/httpd/extra/httpd-modules.conf
# For more detail, see the description in
# https://docs.cloudfoundry.org/buildpacks/php/gsg-php-config.html#engine-configurations

LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule dir_module modules/mod_dir.so
LoadModule mime_module modules/mod_mime.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule remoteip_module modules/mod_remoteip.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule filter_module modules/mod_filter.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so

# Also enable proxy_http for our s3fs module
LoadModule proxy_http_module modules/mod_proxy_http.so
11 changes: 11 additions & 0 deletions .bp-config/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"COMPOSER_INSTALL_OPTIONS": [
"--no-dev --optimize-autoloader --no-progress --no-interaction"
],
"COMPOSER_VENDOR_DIR": "vendor",
"WEBDIR": "web",
"PHP_EXTENSIONS": ["bz2", "curl", "gd", "mbstring", "mcrypt", "pdo", "pdo_mysql", "zip"],
"ADDITIONAL_PREPROCESS_CMDS": [
"$HOME/bootstrap.sh"
]
}
3 changes: 3 additions & 0 deletions .bp-config/php/php.ini.d/memory_limit.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 512M
29 changes: 29 additions & 0 deletions .cfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Ignore directories generated by Composer
/drush/contrib/
/vendor/
/web/core/
/web/modules/contrib/
/web/themes/contrib/
/web/profiles/contrib/
/web/libraries/

# Typically, composer generates a .gitignore to ignore the
# `settings.php` files. For cloud.gov and Cloud Foundry, no sensitive
# information is stored in the settings files. Instead, those files
# have code that parses environment variables for DB and S3
#
# Ignore sensitive information [This is a `composer` default]
# /web/sites/*/settings.php
# /web/sites/*/settings.local.php


# Ignore Drupal's file directory
/web/sites/*/files/

# Ignore SimpleTest multi-site environment.
/web/sites/simpletest

# Ignore files generated by PhpStorm
/.idea/

.DS_Store
22 changes: 22 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM php:7.1-apache

# Set the DocumentRoot to /var/www/web instead of /var/www/html
RUN sed -i 's/html/web/g' /etc/apache2/sites-available/000-default.conf

RUN apt-get update &&\
apt-get install -y \
libbz2-dev libcurl4-openssl-dev libmcrypt-dev \
libwebp-dev libjpeg-dev libpng12-dev \
git jq wget mysql-client &&\
docker-php-ext-install bz2 curl gd mbstring mcrypt pdo pdo_mysql zip &&\
apt-get autoremove -y &&\
rm -rf /var/lib/apt/lists/* &&\
rm -rf /var/cache/apt/*

RUN a2enmod rewrite proxy proxy_http

COPY ["install-composer.sh", "/tmp"]
RUN "/tmp/install-composer.sh"

# Add composer-installed libs to path
ENV PATH=/var/www/vendor/bin:$PATH
20 changes: 20 additions & 0 deletions .docker/install-composer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# from https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
set -e

EXPECTED_SIGNATURE=$(wget -q -O - 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');")

if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi

php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar /usr/local/bin/composer
exit $RESULT
5 changes: 5 additions & 0 deletions .docker/startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

/var/www/.docker/wait_for_db_then /var/www/bootstrap.sh
apache2-foreground
17 changes: 17 additions & 0 deletions .docker/wait_for_db_then
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -e

FIRST_RUN=true

until (echo 2>/dev/null > /dev/tcp/database/3306)
do
echo "Startup: Waiting for MySQL..."
if $FIRST_RUN; then
echo -e "\tTo track progress, run:"
echo -e "\tdocker-compose logs -f database"
FIRST_RUN=false
fi
sleep 1
done

exec "$@"
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@ core
# Core's dependencies are managed with Composer.
vendor

# Ignore local versions of modules.
modules/*
web/modules/contrib/*
web/themes/contrib/*

# Ignore compiled twig templates
storage/php

# Ignore local database dumps.
db_dumps

# Ignore configuration files that may contain sensitive information.
sites/*/settings*.php
sites/*/*settings*.php*
sites/*/services*.yml
sites/default/default.services.*

# Ignore paths that contain user-generated content.
sites/*/files
Expand Down
189 changes: 0 additions & 189 deletions .htaccess

This file was deleted.

6 changes: 0 additions & 6 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
Fixes issue(s) # .

[![CircleCI](https://circleci.com/gh/18F/nsf-sbir/tree/BRANCH_NAME.svg?style=svg)](https://circleci.com/gh/18F/nsf-sbir/tree/BRANCH_NAME)

[:sunglasses: PREVIEW](https://federalist.fr.cloud.gov/preview/18f/nsf-sbir/BRANCH_NAME/)

[Preview README for this branch](https://github.com/18F/nsf-sbir/blob/BRANCH_NAME/README.md)

Changes proposed in this pull request:
-
-
Expand Down
Loading

0 comments on commit 0c41f13

Please sign in to comment.