Permalink
Browse files

Update

  • Loading branch information...
viljaste committed Sep 4, 2017
1 parent 808da2a commit e8dca9db566904e8002304f201341b0593e4dcbf
View
@@ -3,5 +3,10 @@ MYSQL_USER=container
MYSQL_PASSWORD=container
MYSQL_ROOT_PASSWORD=root
XDEBUG_REMOTE_CONNECT_BACK=On
XDEBUG_IDEKEY=PHPSTORM
XDEBUG_REMOTE_HOST=127.0.0.1
XDEBUG_REMOTE_PORT=9000
BLACKFIRE_SERVER_ID=
BLACKFIRE_SERVER_TOKEN=
View
@@ -81,5 +81,6 @@ fi
docker exec -it "${PHP_CONTAINER}" bash -c "rm -rf /usr/local/apache2/htdocs/web"
docker exec -it "${PHP_CONTAINER}" bash -c "composer create-project drupal-composer/drupal-project:8.x-dev /usr/local/apache2/htdocs --stability dev --no-interaction"
docker exec -it "${PHP_CONTAINER}" bash -c "cd /usr/local/apache2/htdocs/web && echo y | ../vendor/drush/drush/drush site-install standard --db-url=mysql://root:root@db/drupal --account-mail=admin@example.com --account-name=admin --account-pass=admin --site-mail=admin@example.com --site-name=Drupalstack"
cd "${WORKING_DIR}"
View
@@ -18,18 +18,6 @@ if [ "${?}" -ne 0 ]; then
exit 1
fi
endpoints() {
cat <<"EOF"
[
{
"Name": "local",
"URL": "unix:///var/run/docker.sock"
}
]
EOF
}
mkdir -p /tmp/endpoints
echo -n "$(endpoints)" > /tmp/endpoints/endpoints.json
docker rm -fv portainer
docker run -d -p 80:9000 --restart="always" --name portainer -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/endpoints:/endpoints portainer/portainer:latest --no-auth --external-endpoints /endpoints/endpoints.json
docker rm -fv portainer || true
docker pull portainer/portainer:latest
docker run -d -p 80:9000 --restart="always" --name portainer -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/endpoints:/endpoints portainer/portainer:latest --no-auth -H unix:///var/run/docker.sock
View
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e
# ---------------------------------------------------------------------------- #
# #
# Remove project files. #
# #
# ---------------------------------------------------------------------------- #
SCRIPT_PATH="$(dirname ${0})"
SCRIPT_PATH="$(cd ${SCRIPT_PATH} && pwd)"
PROJECT_ROOT="$(cd ${SCRIPT_PATH}/.. && pwd)"
sudo chmod 777 -R "${PROJECT_ROOT}/www"
sudo rm -rf "${PROJECT_ROOT}/www"
mkdir -p "${PROJECT_ROOT}/www/web"
touch "${PROJECT_ROOT}/www/web/.gitkeep"
View
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -e
# ---------------------------------------------------------------------------- #
# #
# Build and run project services. #
# #
# ---------------------------------------------------------------------------- #
WORKING_DIR="$(pwd)"
SCRIPT_PATH="$(dirname ${0})"
SCRIPT_PATH="$(cd ${SCRIPT_PATH} && pwd)"
PROJECT_ROOT="$(cd ${SCRIPT_PATH}/.. && pwd)"
hash docker-compose 2> /dev/null
if [ "${?}" -ne 0 ]; then
echo "docker-compose command not found."
exit 1
fi
cd "${PROJECT_ROOT}"
docker-compose -f docker-compose.yml stop
docker-compose -f docker-compose.yml up -d
cd "${WORKING_DIR}"
View
@@ -19,31 +19,33 @@ services:
- mysql:db
- mailhog:mailhog
- blackfire:blackfire
environment:
XDEBUG_CONFIG: remote_connect_back=${XDEBUG_REMOTE_CONNECT_BACK} idekey=${XDEBUG_IDEKEY} remote_host=${XDEBUG_REMOTE_HOST} remote_port=${XDEBUG_REMOTE_PORT}
mysql:
build: ./services/mysql
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
blackfire:
image: blackfire/blackfire:latest
environment:
- BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
- BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
BLACKFIRE_SERVER_ID: ${BLACKFIRE_SERVER_ID}
BLACKFIRE_SERVER_TOKEN: ${BLACKFIRE_SERVER_TOKEN}
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
ports:
- "80"
links:
- mysql:db
environment:
- PMA_USER=root
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
PMA_USER: root
PMA_PASSWORD: ${MYSQL_ROOT_PASSWORD}
mailhog:
image: mailhog/mailhog:latest
ports:
@@ -14,3 +14,9 @@ sys_temp_dir = /tmp
date.timezone = "Europe/Tallinn"
upload_max_filesize = 512M
sendmail_path = "/usr/sbin/ssmtp -t"
xdebug.remote_enable = On
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.max_nesting_level = 1000
xdebug.var_display_max_depth = 5

0 comments on commit e8dca9d

Please sign in to comment.