This repository has been archived by the owner on Oct 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed the entrypoint.sh from the versioned images (#297)
- Loading branch information
Takashi Matsuo
authored
May 26, 2017
1 parent
3ba61a9
commit 857901e
Showing
16 changed files
with
106 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2015 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# This file configure the runtime dynamically based on the contents | ||
# and environment variables that user provides. | ||
|
||
set -xe | ||
|
||
/bin/bash /build-scripts/move-config-files.sh | ||
|
||
# Configure memcached based session. | ||
if [ -n "${MEMCACHE_PORT_11211_TCP_ADDR}" ] && [ -n "${MEMCACHE_PORT_11211_TCP_PORT}" ]; then | ||
cat <<EOF > ${PHP_DIR}/lib/conf.d/memcached-session.ini | ||
session.save_handler=memcached | ||
session.save_path="${MEMCACHE_PORT_11211_TCP_ADDR}:${MEMCACHE_PORT_11211_TCP_PORT}" | ||
EOF | ||
fi | ||
|
||
if [ -f "${APP_DIR}/composer.json" ]; then | ||
# run the composer scripts for post-deploy | ||
if su www-data -c "php /usr/local/bin/composer --no-ansi run-script -l" \ | ||
| grep -q "post-deploy-cmd"; then | ||
su www-data -c \ | ||
"php /usr/local/bin/composer run-script post-deploy-cmd \ | ||
--no-ansi \ | ||
--no-interaction" \ | ||
|| (echo 'Failed to execute post-deploy-cmd'; exit 1) | ||
fi | ||
fi | ||
|
||
/bin/bash /build-scripts/lockdown.sh | ||
|
||
exec "$@" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2017 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -xe | ||
|
||
# Lock down the DOCUMENT_ROOT | ||
chown -R root.www-data ${DOCUMENT_ROOT} | ||
chmod -R 550 ${DOCUMENT_ROOT} | ||
|
||
# Change the www-data's shell back to /usr/sbin/nologin | ||
chsh -s /usr/sbin/nologin www-data | ||
|
||
# Enable suhosin for PHP 5.6.x | ||
if [ -x "${PHP56_DIR}/bin/php56-enmod" ]; then | ||
${PHP56_DIR}/bin/php56-enmod suhosin | ||
fi | ||
|
||
# Whitelist functions | ||
${PHP_DIR}/bin/php -d auto_prepend_file='' \ | ||
/build-scripts/whitelist_functions.php | ||
|
||
# Remove loose php-cli.ini | ||
rm /opt/php/lib/php-cli.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters