Skip to content

Commit 21d9fc5

Browse files
authored
Merge pull request #57 from skilld-labs/updates
Import latest updates
2 parents b7afb13 + b3ee10f commit 21d9fc5

File tree

5 files changed

+12
-249
lines changed

5 files changed

+12
-249
lines changed

.env.default

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SITE_NAME=Site name
77
88
PROJECT_INSTALL=
99
PHP_VERSION=7
10-
IMAGE_PHP=skilldlabs/php:71-fpm
10+
IMAGE_PHP=skilldlabs/php:72-fpm
1111
IMAGE_FRONT=skilldlabs/frontend:zen
1212
DB_URL=sqlite:///dev/shm/d8.sqlite
13+
MYSQL_BASE_PATH=/dev/shm

Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ CUID ?= $(LOCAL_UID)
1717
CGID ?= $(LOCAL_GID)
1818

1919
COMPOSE_NET_NAME := $(COMPOSE_PROJECT_NAME)_front
20+
MYSQL_DATADIR := $(MYSQL_BASE_PATH)/$(COMPOSE_PROJECT_NAME)_mysql
2021

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

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

@@ -131,6 +132,7 @@ down:
131132
clean: DIRS := core libraries modules/contrib profiles/contrib sites themes/contrib
132133
clean: info down
133134
@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
135+
@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
134136

135137
net:
136138
ifeq ($(shell docker network ls -q -f Name=$(COMPOSE_NET_NAME)),)
@@ -140,7 +142,7 @@ ifeq ($(shell grep -c -F 'IPRANGE=' .env), 0)
140142
# @echo Define IP range $(net-range)
141143
@printf "\nIPRANGE=%s\n" $(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}') >> .env
142144
else
143-
@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;
145+
# @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;
144146
endif
145147
# grep -q -F 'IPRANGE=' .env || printf "\nIPRANGE=$(shell docker network inspect $(COMPOSE_NET_NAME) --format '{{(index .IPAM.Config 0).Subnet}}')" >> .env
146148

@@ -159,7 +161,7 @@ lint:
159161
dev:
160162
@echo "Dev tasks..."
161163
$(call php, composer install --prefer-dist -o)
162-
$(call php-0, chmod -R 777 web/sites/default)
164+
$(call php-0, chmod +w web/sites/default)
163165
$(call php, cp web/sites/default/default.services.yml web/sites/default/services.yml)
164166
$(call php, sed -i -e 's/debug: false/debug: true/g' web/sites/default/services.yml)
165167
$(call php, cp web/sites/example.settings.local.php web/sites/default/settings.local.php)

docker/docker-compose.override.yml.default

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "2"
1+
version: "2.1"
22

33
services:
44

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

2121
# adminer:
2222
# image: dockette/adminer:mysql-php7

docker/docker-compose.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "2"
1+
version: "2.1"
22

33
services:
44

@@ -15,14 +15,12 @@ services:
1515
- front
1616

1717
nginx:
18-
image: skilldlabs/nginx:1.10.1
18+
image: skilldlabs/nginx:1.14.1
1919
container_name: "${COMPOSE_PROJECT_NAME}_web"
2020
depends_on:
2121
- php
2222
volumes_from:
2323
- php
24-
volumes:
25-
- ./drupal8.conf:/etc/nginx/conf.d/drupal8.conf:z
2624
restart: always
2725
networks:
2826
- front

docker/drupal8.conf

-238
This file was deleted.

0 commit comments

Comments
 (0)