Skip to content

Commit 0c41f13

Browse files
authored
Merge branch 'master' into 139-restrict-by-ip
2 parents cc393a4 + 8d717ed commit 0c41f13

File tree

2,740 files changed

+36273
-194639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,740 files changed

+36273
-194639
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file was built from
2+
# https://github.com/cloudfoundry/php-buildpack/blob/master/defaults/config/httpd/extra/httpd-modules.conf
3+
# For more detail, see the description in
4+
# https://docs.cloudfoundry.org/buildpacks/php/gsg-php-config.html#engine-configurations
5+
6+
LoadModule authz_core_module modules/mod_authz_core.so
7+
LoadModule authz_host_module modules/mod_authz_host.so
8+
LoadModule log_config_module modules/mod_log_config.so
9+
LoadModule env_module modules/mod_env.so
10+
LoadModule setenvif_module modules/mod_setenvif.so
11+
LoadModule dir_module modules/mod_dir.so
12+
LoadModule mime_module modules/mod_mime.so
13+
LoadModule reqtimeout_module modules/mod_reqtimeout.so
14+
LoadModule unixd_module modules/mod_unixd.so
15+
LoadModule mpm_event_module modules/mod_mpm_event.so
16+
LoadModule proxy_module modules/mod_proxy.so
17+
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
18+
LoadModule remoteip_module modules/mod_remoteip.so
19+
LoadModule rewrite_module modules/mod_rewrite.so
20+
LoadModule filter_module modules/mod_filter.so
21+
LoadModule deflate_module modules/mod_deflate.so
22+
LoadModule headers_module modules/mod_headers.so
23+
24+
# Also enable proxy_http for our s3fs module
25+
LoadModule proxy_http_module modules/mod_proxy_http.so

.bp-config/options.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"COMPOSER_INSTALL_OPTIONS": [
3+
"--no-dev --optimize-autoloader --no-progress --no-interaction"
4+
],
5+
"COMPOSER_VENDOR_DIR": "vendor",
6+
"WEBDIR": "web",
7+
"PHP_EXTENSIONS": ["bz2", "curl", "gd", "mbstring", "mcrypt", "pdo", "pdo_mysql", "zip"],
8+
"ADDITIONAL_PREPROCESS_CMDS": [
9+
"$HOME/bootstrap.sh"
10+
]
11+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
; Maximum amount of memory a script may consume (128MB)
2+
; http://php.net/memory-limit
3+
memory_limit = 512M

.cfignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Ignore directories generated by Composer
2+
/drush/contrib/
3+
/vendor/
4+
/web/core/
5+
/web/modules/contrib/
6+
/web/themes/contrib/
7+
/web/profiles/contrib/
8+
/web/libraries/
9+
10+
# Typically, composer generates a .gitignore to ignore the
11+
# `settings.php` files. For cloud.gov and Cloud Foundry, no sensitive
12+
# information is stored in the settings files. Instead, those files
13+
# have code that parses environment variables for DB and S3
14+
#
15+
# Ignore sensitive information [This is a `composer` default]
16+
# /web/sites/*/settings.php
17+
# /web/sites/*/settings.local.php
18+
19+
20+
# Ignore Drupal's file directory
21+
/web/sites/*/files/
22+
23+
# Ignore SimpleTest multi-site environment.
24+
/web/sites/simpletest
25+
26+
# Ignore files generated by PhpStorm
27+
/.idea/
28+
29+
.DS_Store

.docker/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM php:7.1-apache
2+
3+
# Set the DocumentRoot to /var/www/web instead of /var/www/html
4+
RUN sed -i 's/html/web/g' /etc/apache2/sites-available/000-default.conf
5+
6+
RUN apt-get update &&\
7+
apt-get install -y \
8+
libbz2-dev libcurl4-openssl-dev libmcrypt-dev \
9+
libwebp-dev libjpeg-dev libpng12-dev \
10+
git jq wget mysql-client &&\
11+
docker-php-ext-install bz2 curl gd mbstring mcrypt pdo pdo_mysql zip &&\
12+
apt-get autoremove -y &&\
13+
rm -rf /var/lib/apt/lists/* &&\
14+
rm -rf /var/cache/apt/*
15+
16+
RUN a2enmod rewrite proxy proxy_http
17+
18+
COPY ["install-composer.sh", "/tmp"]
19+
RUN "/tmp/install-composer.sh"
20+
21+
# Add composer-installed libs to path
22+
ENV PATH=/var/www/vendor/bin:$PATH

.docker/install-composer.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
# from https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
3+
set -e
4+
5+
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
6+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
7+
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
8+
9+
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
10+
then
11+
>&2 echo 'ERROR: Invalid installer signature'
12+
rm composer-setup.php
13+
exit 1
14+
fi
15+
16+
php composer-setup.php --quiet
17+
RESULT=$?
18+
rm composer-setup.php
19+
mv composer.phar /usr/local/bin/composer
20+
exit $RESULT

.docker/startup

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -e
3+
4+
/var/www/.docker/wait_for_db_then /var/www/bootstrap.sh
5+
apache2-foreground

.docker/wait_for_db_then

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -e
3+
4+
FIRST_RUN=true
5+
6+
until (echo 2>/dev/null > /dev/tcp/database/3306)
7+
do
8+
echo "Startup: Waiting for MySQL..."
9+
if $FIRST_RUN; then
10+
echo -e "\tTo track progress, run:"
11+
echo -e "\tdocker-compose logs -f database"
12+
FIRST_RUN=false
13+
fi
14+
sleep 1
15+
done
16+
17+
exec "$@"

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,21 @@ core
1616
# Core's dependencies are managed with Composer.
1717
vendor
1818

19+
# Ignore local versions of modules.
20+
modules/*
21+
web/modules/contrib/*
22+
web/themes/contrib/*
23+
24+
# Ignore compiled twig templates
25+
storage/php
26+
27+
# Ignore local database dumps.
28+
db_dumps
29+
1930
# Ignore configuration files that may contain sensitive information.
20-
sites/*/settings*.php
31+
sites/*/*settings*.php*
2132
sites/*/services*.yml
33+
sites/default/default.services.*
2234

2335
# Ignore paths that contain user-generated content.
2436
sites/*/files

.htaccess

Lines changed: 0 additions & 189 deletions
This file was deleted.

PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
Fixes issue(s) # .
22

3-
[![CircleCI](https://circleci.com/gh/18F/nsf-sbir/tree/BRANCH_NAME.svg?style=svg)](https://circleci.com/gh/18F/nsf-sbir/tree/BRANCH_NAME)
4-
5-
[:sunglasses: PREVIEW](https://federalist.fr.cloud.gov/preview/18f/nsf-sbir/BRANCH_NAME/)
6-
7-
[Preview README for this branch](https://github.com/18F/nsf-sbir/blob/BRANCH_NAME/README.md)
8-
93
Changes proposed in this pull request:
104
-
115
-

0 commit comments

Comments
 (0)