Skip to content

Commit

Permalink
Merge pull request #30 from SBU-BMI/develop
Browse files Browse the repository at this point in the history
updates and fixes
  • Loading branch information
ebremer authored Aug 20, 2019
2 parents 0b6489d + f8d78b2 commit 7ee42ad
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ RUN sed -i 's/sys_temp_dir =/sys_temp_dir = "\/data\/tmp"/g' /etc/php.ini
# set up Drupal private file area
RUN mkdir -p /data/pathdb/files
RUN chown -R apache /data/pathdb/files
RUN chgrp -R apache /data/pathdb/files
RUN chmod -R 770 /data/pathdb/files
RUN echo "\
\$config_directories['sync'] = '/data/pathdb/config/sync';\
\$settings['file_private_path'] = '/data/pathdb/files';\
\$databases['default']['default'] = array (\
'database' => 'QuIP',\
Expand All @@ -85,7 +88,6 @@ RUN echo "\
\$settings['hash_salt'] = '`uuidgen`';\
" >> web/sites/default/settings.php


# create self-signed digital keys for JWT
WORKDIR /etc/httpd/conf
RUN openssl req -subj '/CN=www.mydom.com/O=My Company Name LTD./C=US' -x509 -nodes -newkey rsa:2048 -keyout quip.key -out quip.crt
Expand Down
1 change: 0 additions & 1 deletion config/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ module:
taxonomy_unique: 0
text: 0
token: 0
toolbar: 0
tour: 0
update: 0
user: 0
Expand Down
2 changes: 1 addition & 1 deletion config/views.view.maps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ display:
entity_type: node
entity_field: nid
plugin_id: standard
title: maps
title: 'Feature Maps'
header: { }
footer: { }
empty: { }
Expand Down
Binary file modified mysql.tgz
Binary file not shown.
28 changes: 21 additions & 7 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#create tmp directory if missing
if [ ! -d /data/tmp ]; then
mkdir -p /data/tmp
chmod a=rwx,o+t /data/tmp
fi

# clear any stale httpd.pid files
FILE=/var/run/httpd/httpd.pid
if [ -f "$FILE" ]; then
Expand All @@ -11,25 +11,38 @@ if [ -f "$FILE" ]; then
fi
# clear out other stale processes
rm -rf /run/httpd/*
#make sure permissions of pathdb folder are correct
# make sure permissions of pathdb folder are correct
chown -R apache /quip/web/sites/default
chgrp -R apache /quip/web/sites/default
chmod -R 770 /quip/web/sites/default

# make sure sync folder exists and set permissions
if [ ! -d /data/pathdb/config/sync ]; then
mkdir -p /data/pathdb/config/sync
chown -R apache /data/pathdb/config/sync
chgrp -R apache /data/pathdb/config/sync
chmod -R 770 /data/pathdb/config/sync
fi
if [ ! -d /data/pathdb/mysql ] && [ -f /build/mysql.tgz ]; then
cd /data/pathdb
cp -cp /build/mysql.tgz .
tar xvfz mysql.tgz
chown -R mysql mysql
rm mysql.tgz
rm mysql.tgz
# since database is being rebuilt, make sure permissions are okay on files folder
chown -R apache /data/pathdb/files
chgrp -R apache /data/pathdb/files
chmod -R 770 /data/pathdb/files
# rebuild cache
cd /quip/web
/quip/vendor/bin/drush -y cache-rebuild
fi
if [ ! -d /data/pathdb/mysql ]; then
# PathDB not initialized. Create default MySQL database and make PathDB changes
mysql_install_db --user=mysql --ldata=/data/pathdb/mysql
/usr/bin/mysqld_safe --datadir='/data/pathdb/mysql' &
sleep 10
mysql -u root -e "create database QuIP"
cd /data/pathdb/quip/web
cd /quip/web
/quip/vendor/bin/drush -y si standard --db-url=mysql://root:@localhost/QuIP
/quip/vendor/bin/drush -y upwd admin bluecheese2018
/quip/vendor/bin/drush -y pm:enable rest serialization
Expand All @@ -40,7 +53,6 @@ if [ ! -d /data/pathdb/mysql ]; then
/quip/vendor/bin/drush -y pm:uninstall toolbar
/quip/vendor/bin/drush -y pm:uninstall hide_revision_field
/quip/vendor/bin/drush -y cache-rebuild
chown -R apache /data/pathdb/files
httpd -f /config/httpd.conf
counter=0;
wget --spider --quiet http://localhost
Expand Down Expand Up @@ -83,7 +95,9 @@ if [ ! -d /data/pathdb/mysql ]; then
else
/usr/bin/mysqld_safe --datadir='/data/pathdb/mysql' &
httpd -f /config/httpd.conf
cd /quip/web
/quip/vendor/bin/drush -y updatedb
/quip/vendor/bin/drush -y cache-rebuild
fi

while true; do sleep 1000; done

0 comments on commit 7ee42ad

Please sign in to comment.