Skip to content

Commit

Permalink
Images for Drupal 6/7/8
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Feb 22, 2017
1 parent 6ef8335 commit d72b490
Show file tree
Hide file tree
Showing 46 changed files with 896 additions and 930 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.idea/
env_make
36 changes: 17 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
language: python

sudo: required

services:
- docker

env:
global:
- LATEST_VERSION=8
- REPO=wodby/drupal-php
- LATEST_DRUPAL=8
- LATEST_PHP=7.1
matrix:
- DRUPAL=8 SERVICE=nginx
- DRUPAL=8 SERVICE=varnish
# - DRUPAL=8 SERVICE=php-7.0
- DRUPAL=7 SERVICE=nginx
# - DRUPAL=7 SERVICE=php-7.0
# - DRUPAL=7 SERVICE=php-5.6
- DRUPAL=6 PHP=5.3
- DRUPAL=6 PHP=5.6
- DRUPAL=7 PHP=5.6
- DRUPAL=7 PHP=7.0
- DRUPAL=7 PHP=7.1
- DRUPAL=8 PHP=7.0
- DRUPAL=8 PHP=7.1

install:
- cd ./$DRUPAL/$SERVICE
- cd ./$DRUPAL/$PHP
- make

before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin

script: make test

after_success: |
Expand All @@ -32,18 +31,17 @@ after_success: |
make release
if [ -n "$TRAVIS_TAG" ]; then
make VERSION="$TRAVIS_TAG" release
make VERSION="$DRUPAL-$PHP-$TRAVIS_TAG" release
fi
if [ "$VERSION" == "$LATEST_VERSION" ]; then
if [ "$DRUPAL" == "$LATEST_DRUPAL" && "$PHP" == "$LATEST_PHP" ]; then
make VERSION=latest release
fi
fi
after_failure:
- docker-compose -f test/docker-compose.yml
- make logs
after_failure: make logs

notifications:
email:
on_success: never
on_failure: always
6 changes: 6 additions & 0 deletions 6/5.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM wodby/drupal-php:5.3

COPY make.yml /var/www/html

RUN chown -R www-data:www-data /var/www/html/ && \
su-exec www-data drush make make.yml -y
40 changes: 40 additions & 0 deletions 6/5.3/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-include env_make

VERSION ?= 6-5.3

REPO = wodby/drupal
NAME = drupal-$(VERSION)

.PHONY: build test push shell run start stop logs clean release

build:
docker build -t $(REPO):$(VERSION) ./

test:
NAME=$(NAME) ./test.sh

push:
docker push $(REPO):$(VERSION)

shell:
docker run --rm --name $(NAME) -i -t $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) /bin/bash

run:
docker run --rm --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) $(CMD)

start:
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION)

stop:
docker stop $(NAME)

logs:
docker logs $(NAME)

clean:
-docker rm -f $(NAME)

release: build
make push -e VERSION=$(VERSION)

default: build
5 changes: 5 additions & 0 deletions 6/5.3/make.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#production.make.yml:
api: 2
core: 6.x
projects:
- drupal
8 changes: 8 additions & 0 deletions 6/5.3/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -ex

make start

docker exec --user=82 $NAME drush -r /var/www/html status | grep 'Drupal version *: *6\.38'
make clean
6 changes: 6 additions & 0 deletions 6/5.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM wodby/drupal-php:5.6

COPY make.yml /var/www/html

RUN chown -R www-data:www-data /var/www/html/ && \
su-exec www-data drush make make.yml -y
40 changes: 40 additions & 0 deletions 6/5.6/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-include env_make

VERSION ?= 6-5.6

REPO = wodby/drupal
NAME = drupal-$(VERSION)

.PHONY: build test push shell run start stop logs clean release

build:
docker build -t $(REPO):$(VERSION) ./

test:
NAME=$(NAME) ./test.sh

push:
docker push $(REPO):$(VERSION)

shell:
docker run --rm --name $(NAME) -i -t $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) /bin/bash

run:
docker run --rm --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) $(CMD)

start:
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION)

stop:
docker stop $(NAME)

logs:
docker logs $(NAME)

clean:
-docker rm -f $(NAME)

release: build
make push -e VERSION=$(VERSION)

default: build
5 changes: 5 additions & 0 deletions 6/5.6/make.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#production.make.yml:
api: 2
core: 6.x
projects:
- drupal
8 changes: 8 additions & 0 deletions 6/5.6/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -ex

make start

docker exec --user=82 $NAME drush -r /var/www/html status | grep 'Drupal version *: *6\.38'
make clean
7 changes: 7 additions & 0 deletions 7/5.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM wodby/drupal-php:7.0

COPY composer.json /var/www/html

RUN chown -R www-data:www-data /var/www/html/ && \
su-exec www-data composer require && \
su-exec www-data composer clear-cache
40 changes: 40 additions & 0 deletions 7/5.6/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-include env_make

VERSION ?= 7-5.6

REPO = wodby/drupal
NAME = drupal-$(VERSION)

.PHONY: build test push shell run start stop logs clean release

build:
docker build -t $(REPO):$(VERSION) ./

test:
NAME=$(NAME) ./test.sh

push:
docker push $(REPO):$(VERSION)

shell:
docker run --rm --name $(NAME) -i -t $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) /bin/bash

run:
docker run --rm --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) $(CMD)

start:
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION)

stop:
docker stop $(NAME)

logs:
docker logs $(NAME)

clean:
-docker rm -f $(NAME)

release: build
make push -e VERSION=$(VERSION)

default: build
46 changes: 46 additions & 0 deletions 7/5.6/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "drupal-composer/drupal-project",
"description": "Composer template for Drupal projects",
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/7"
}
},
"require": {
"composer/installers": "~1.0",
"derhasi/composer-preserve-paths": "0.1.*",
"drupal/drupal": "7.*"
},
"conflict": {
"drupal/core": "8.*"
},
"scripts": {
"post-create-project-cmd": [
"rm README.md LICENSE .travis.yml phpunit.xml.dist"
]
},
"config": {
"vendor-dir": "vendor"
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"installer-paths": {
"web/": ["type:drupal-core"],
"web/sites/all/modules/contrib/{$name}/": ["type:drupal-module"],
"web/sites/all/themes/contrib/{$name}/": ["type:drupal-theme"],
"web/sites/all/libraries/{$name}/": ["type:drupal-library"],
"web/sites/all/drush/{$name}/": ["type:drupal-drush"],
"web/profiles/{$name}/": ["type:drupal-profile"]
},
"preserve-paths": [
"web/sites/all/modules/contrib",
"web/sites/all/themes/contrib",
"web/sites/all/libraries",
"web/sites/all/drush",
"web/sites/default/settings.php",
"web/sites/default/files"
]
}
}
8 changes: 8 additions & 0 deletions 7/5.6/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -ex

make start

docker exec --user=82 $NAME drush -r /var/www/html/web status | grep 'Drupal version *: *7\.'
make clean
7 changes: 7 additions & 0 deletions 7/7.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM wodby/drupal-php:7.0

COPY composer.json /var/www/html

RUN chown -R www-data:www-data /var/www/html/ && \
su-exec www-data composer require && \
su-exec www-data composer clear-cache
40 changes: 40 additions & 0 deletions 7/7.0/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-include env_make

VERSION ?= 7-7.0

REPO = wodby/drupal
NAME = drupal-$(VERSION)

.PHONY: build test push shell run start stop logs clean release

build:
docker build -t $(REPO):$(VERSION) ./

test:
NAME=$(NAME) ./test.sh

push:
docker push $(REPO):$(VERSION)

shell:
docker run --rm --name $(NAME) -i -t $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) /bin/bash

run:
docker run --rm --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION) $(CMD)

start:
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(VERSION)

stop:
docker stop $(NAME)

logs:
docker logs $(NAME)

clean:
-docker rm -f $(NAME)

release: build
make push -e VERSION=$(VERSION)

default: build
Loading

0 comments on commit d72b490

Please sign in to comment.