Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import latest updates #57

Merged
merged 1 commit into from
Dec 11, 2018
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
3 changes: 2 additions & 1 deletion .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SITE_NAME=Site name
[email protected]
PROJECT_INSTALL=
PHP_VERSION=7
IMAGE_PHP=skilldlabs/php:71-fpm
IMAGE_PHP=skilldlabs/php:72-fpm
IMAGE_FRONT=skilldlabs/frontend:zen
DB_URL=sqlite:///dev/shm/d8.sqlite
MYSQL_BASE_PATH=/dev/shm
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CUID ?= $(LOCAL_UID)
CGID ?= $(LOCAL_GID)

COMPOSE_NET_NAME := $(COMPOSE_PROJECT_NAME)_front
MYSQL_DATADIR := $(MYSQL_BASE_PATH)/$(COMPOSE_PROJECT_NAME)_mysql

php = docker-compose exec -T --user $(CUID):$(CGID) php time ${1}
php-0 = docker-compose exec -T php time ${1}
Expand All @@ -32,10 +33,10 @@ $(error Project name can not be default, please edit ".env" and set COMPOSE_PROJ
endif

prepare:
mkdir -p /dev/shm/${COMPOSE_PROJECT_NAME}_mysql
mkdir -p $(MYSQL_DATADIR)
make -s down
make -s up
$(call php-0, apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community git)
$(call php-0, apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community graphicsmagick)
$(call php-0, kill -USR2 1)
$(call php, composer global require -o --update-no-dev --no-suggest "hirak/prestissimo:^0.3")

Expand Down Expand Up @@ -131,6 +132,7 @@ down:
clean: DIRS := core libraries modules/contrib profiles/contrib sites themes/contrib
clean: info down
@for i in $(DIRS); do if [ -d "web/$$i" ]; then echo "Removing web/$$i..."; docker run --rm -v $(shell pwd):/mnt $(IMAGE_PHP) sh -c "rm -rf /mnt/web/$$i"; fi; done
@if [ -d $(MYSQL_DATADIR) ]; then echo "Removing mysql data $(MYSQL_DATADIR)..."; docker run --rm -v $(MYSQL_BASE_PATH):/mnt/2rm $(IMAGE_PHP) sh -c "rm -rf /mnt/2rm/$(COMPOSE_PROJECT_NAME)_mysql"; fi

net:
ifeq ($(shell docker network ls -q -f Name=$(COMPOSE_NET_NAME)),)
Expand All @@ -140,7 +142,7 @@ ifeq ($(shell grep -c -F 'IPRANGE=' .env), 0)
# @echo Define IP range $(net-range)
@printf "\nIPRANGE=%s\n" $(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}') >> .env
else
@if [ '$(IPRANGE)' != '$(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}')' ]; then echo "Replace IP range $(IPRANGE)"; sed -i "s#IPRANGE=.*#IPRANGE=$(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}')#" .env; fi;
# @if [ '$(IPRANGE)' != '$(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}')' ]; then echo "Replace IP range $(IPRANGE)"; sed -i "s#IPRANGE=.*#IPRANGE=$(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}')#" .env; fi;
endif
# grep -q -F 'IPRANGE=' .env || printf "\nIPRANGE=$(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}')" >> .env

Expand All @@ -159,7 +161,7 @@ lint:
dev:
@echo "Dev tasks..."
$(call php, composer install --prefer-dist -o)
$(call php-0, chmod -R 777 web/sites/default)
$(call php-0, chmod +w web/sites/default)
$(call php, cp web/sites/default/default.services.yml web/sites/default/services.yml)
$(call php, sed -i -e 's/debug: false/debug: true/g' web/sites/default/services.yml)
$(call php, cp web/sites/example.settings.local.php web/sites/default/settings.local.php)
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.override.yml.default
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2"
version: "2.1"

services:

Expand All @@ -16,7 +16,7 @@ services:
# volumes:
# - ../../mysql:/var/lib/mysql:Z
# On for linux machines use ramfs, make sure to create the directory first.
# - /dev/shm/${COMPOSE_PROJECT_NAME}_mysql:/var/lib/mysql:Z
# - ${MYSQL_BASE_PATH}/${COMPOSE_PROJECT_NAME}_mysql:/var/lib/mysql:Z

# adminer:
# image: dockette/adminer:mysql-php7
Expand Down
6 changes: 2 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2"
version: "2.1"

services:

Expand All @@ -15,14 +15,12 @@ services:
- front

nginx:
image: skilldlabs/nginx:1.10.1
image: skilldlabs/nginx:1.14.1
container_name: "${COMPOSE_PROJECT_NAME}_web"
depends_on:
- php
volumes_from:
- php
volumes:
- ./drupal8.conf:/etc/nginx/conf.d/drupal8.conf:z
restart: always
networks:
- front
Expand Down
238 changes: 0 additions & 238 deletions docker/drupal8.conf

This file was deleted.