Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .docker/os2web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ RUN echo '<?php $settings["project_env"] = PROD_ENV; ' > /opt/drupal/web/sites/d
# Adding syn directory.
mkdir -p config/sync; \
# Adjusting ownership
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync; \
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync /opt/drupal/tmp; \
chmod g+s -R /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync

# Adding custom apache configuration with PHP value and log settings.
COPY apache/000-default.conf /etc/apache2/sites-enabled/000-default.conf

# Adding Drupal settings.
COPY settings/prod.settings.php /opt/drupal/web/sites/default/
45 changes: 45 additions & 0 deletions .docker/os2web/apache/000-default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

php_admin_value open_basedir /opt/drupal:/usr/share/php
php_value include_path .:/opt/drupal

php_value log_errors 1
php_value html_errors 0
php_value display_errors 0
php_admin_value error_reporting 1023
php_value error_log /opt/drupal/logs/php.log

php_value session.save_path /opt/drupal/sessions
php_admin_value upload_max_filesize 150
php_admin_value upload_tmp_dir /opt/drupal/tmp

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

2 changes: 1 addition & 1 deletion .docker/os2web/settings/prod.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@

$settings['hash_salt'] = getenv('DRUPAL_HASH_SALT');

$settings['file_temp_path'] = '/tmp';
$settings['file_temp_path'] = '../tmp';
$settings['file_private_path'] = '../private';

8 changes: 8 additions & 0 deletions .docker/solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM solr:8.5.2

# Copying solr core config to get abylity create project SOLR core
COPY config /solr-config

# Initiate entrypoint for create SOLR core
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
25 changes: 25 additions & 0 deletions .docker/solr/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

if [ $# -eq 0 ]; then
echo "WARNING: There was no tag-name provided!"
echo "Script usage is: './build.sh tag-name'"
echo "Example: './build.sh 1.0.3'"
exit 0
fi

docker build ./ -t dkbellcom/os2web8-solr:$1

if [ "$2" = "--push" ]; then
echo "Docker login to dkbellcom. Type password:"
read -s DOCKERHUB_PASS
echo "Authorization..."
echo $DOCKERHUB_PASS | docker login --username dkbellcom --password-stdin

if [ $? -eq 0 ]; then
echo "Pushing image to docker hub ..."
docker push dkbellcom/os2web8-solr:$1
echo "Check your image here https://hub.docker.com/repository/docker/dkbellcom/os2web8-solr/tag"
else
echo "Image is not pushed to docker hub :("
fi;
fi;
10 changes: 10 additions & 0 deletions .docker/solr/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
if [ ! -d "/var/solr/data/os2web-core" ]; then
echo "Creating SOLR core os2web-core"
bin/solr start
bin/solr create_core -c os2web-core -d /solr-config
bin/solr stop
fi

# Starting SOLR service.
solr-foreground
12 changes: 12 additions & 0 deletions .docksal/docksal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,15 @@ services:
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}
labels:
- io.docksal.virtual-host=pma.${VIRTUAL_HOST}

blackfire:
extends:
file: ${HOME}/.docksal/stacks/services.yml
service: blackfire
environment:
- BLACKFIRE_LOG_LEVEL=4

memcached:
extends:
file: ${HOME}/.docksal/stacks/services.yml
service: memcached
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@
*.sql
*.sql.gz

# docker/docksal
logs/*.log
logs/*
!logs/.gitkeep
tmp/*
!tmp/.gitkeep
sessions/*
!sessions/.gitkeep

.docker/logs/*
!.docker/logs/.gitkeep
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"drupal/console": "^1.0.2",
"drupal/core": "^8.8.0",
"drupal/core-composer-scaffold": "^8.8.0",
"drupal/memcache": "^2.2",
"drupal/monitoring": "^1.9",
"drupal/stage_file_proxy": "^1.0",
"drush/drush": "^9.7.1 | ^10.0.0",
"mglaman/drupal-check": "^1.1",
Expand Down
Loading