Skip to content

Commit 75bd595

Browse files
committed
Merge branch 'feature/cloud-support' into develop
# Conflicts: # docker-env.yml # docker/main/provision/roles/mysql/templates/my.cnf.j2 # docker/main/provision/variables.yml # docker/web/bin/httpd/entrypoint.sh # docker/web/bin/nginx/entrypoint.sh # docker/web/conf/httpd/vhost.conf # docker/web/conf/nginx/vhost.conf
2 parents c096056 + 4bcf93e commit 75bd595

File tree

128 files changed

+1147
-2375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+1147
-2375
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.md
2+
.git*
3+
/backup/
4+
/bin/
5+
/documentation/
6+
/docker/
7+
/code/

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
.idea
33
nbproject
44
/backup/*
5-
/code/*
5+
/code/*
6+
/docker/sourcecode/code/*
7+
/docker-compose.yml

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
PHP Docker Boilerplate Changelog
22
==================================
33

4-
4.1.0 - UPCOMING
4+
5.0.0 - UPCOMING
5+
----------------
6+
- Refactored with new `webdevops/base` images
7+
- Faster creation/startup times
8+
- Ansible provisioning
9+
- Real production and development provisioning
10+
- Added cloud support (without host mounted volumes)
11+
12+
4.1.0 - canceled
513
------------------
614
- Added cron
715
- Improved documentation

Dockerfile.cloud

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Application Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# PHP-Versions:
6+
# ubuntu-12.04 -> PHP 5.3, LTS (precise)
7+
# ubuntu-14.04 -> PHP 5.5, LTS (trusty)
8+
# ubuntu-15.04 -> PHP 5.6 (vivid)
9+
# ubuntu-15.10 -> PHP 5.6 (wily)
10+
# centos-7 -> PHP 5.4
11+
#
12+
# Apache:
13+
# webdevops/php-apache:ubuntu-12.04
14+
# webdevops/php-apache:ubuntu-14.04
15+
# webdevops/php-apache:ubuntu-15.04
16+
# webdevops/php-apache:ubuntu-15.10
17+
# webdevops/php-apache:centos-7
18+
#
19+
# Nginx:
20+
# webdevops/php-nginx:ubuntu-12.04
21+
# webdevops/php-nginx:ubuntu-14.04
22+
# webdevops/php-nginx:ubuntu-15.04
23+
# webdevops/php-nginx:ubuntu-15.10
24+
# webdevops/php-nginx:centos-7
25+
#
26+
# HHVM:
27+
# webdevops/hhvm-apache
28+
# webdevops/hhvm-nginx
29+
#
30+
#++++++++++++++++++++++++++++++++++++++
31+
32+
FROM webdevops/php-apache:ubuntu-14.04
33+
34+
ENV PROVISION_CONTEXT "production"
35+
36+
# Deploy scripts/configurations
37+
COPY etc/ /opt/docker/etc/
38+
COPY provision/ /opt/docker/provision/
39+
40+
COPY code/ /application/code/
41+
42+
RUN /opt/docker/bin/control.sh provision.role.startup boilerplate-main \
43+
&& /opt/docker/bin/control.sh provision.role.startup boilerplate-deployment \
44+
&& /opt/docker/bin/control.sh service.enable cron \
45+
&& /opt/docker/bin/control.sh service.enable dnsmasq \
46+
&& /opt/docker/bin/bootstrap.sh
47+
48+
# Configure volume/workdir
49+
RUN mkdir -p /application/code/
50+
VOLUME /application/
51+
WORKDIR /application/code/

Dockerfile.development

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Application Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# PHP-Versions:
6+
# ubuntu-12.04 -> PHP 5.3, LTS (precise)
7+
# ubuntu-14.04 -> PHP 5.5, LTS (trusty)
8+
# ubuntu-15.04 -> PHP 5.6 (vivid)
9+
# ubuntu-15.10 -> PHP 5.6 (wily)
10+
# centos-7 -> PHP 5.4
11+
#
12+
# Apache:
13+
# webdevops/php-apache:ubuntu-12.04
14+
# webdevops/php-apache:ubuntu-14.04
15+
# webdevops/php-apache:ubuntu-15.04
16+
# webdevops/php-apache:ubuntu-15.10
17+
# webdevops/php-apache:centos-7
18+
#
19+
# Nginx:
20+
# webdevops/php-nginx:ubuntu-12.04
21+
# webdevops/php-nginx:ubuntu-14.04
22+
# webdevops/php-nginx:ubuntu-15.04
23+
# webdevops/php-nginx:ubuntu-15.10
24+
# webdevops/php-nginx:centos-7
25+
#
26+
# HHVM:
27+
# webdevops/hhvm-apache
28+
# webdevops/hhvm-nginx
29+
#
30+
#++++++++++++++++++++++++++++++++++++++
31+
32+
FROM webdevops/php-apache:ubuntu-14.04
33+
34+
ENV PROVISION_CONTEXT "development"
35+
36+
# Deploy scripts/configurations
37+
COPY etc/ /opt/docker/etc/
38+
COPY provision/ /opt/docker/provision/
39+
40+
RUN /opt/docker/bin/control.sh provision.role boilerplate-main \
41+
&& /opt/docker/bin/control.sh provision.role boilerplate-main-development \
42+
&& /opt/docker/bin/control.sh provision.role.startup boilerplate-deployment \
43+
&& /opt/docker/bin/control.sh service.enable cron \
44+
&& /opt/docker/bin/control.sh service.enable dnsmasq \
45+
&& /opt/docker/bin/control.sh service.enable postfix \
46+
&& /opt/docker/bin/bootstrap.sh
47+
48+
# Configure volume/workdir
49+
RUN mkdir -p /application/code/
50+
WORKDIR /application/code/

Dockerfile.production

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Application Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# PHP-Versions:
6+
# ubuntu-12.04 -> PHP 5.3, LTS (precise)
7+
# ubuntu-14.04 -> PHP 5.5, LTS (trusty)
8+
# ubuntu-15.04 -> PHP 5.6 (vivid)
9+
# ubuntu-15.10 -> PHP 5.6 (wily)
10+
# centos-7 -> PHP 5.4
11+
#
12+
# Apache:
13+
# webdevops/php-apache:ubuntu-12.04
14+
# webdevops/php-apache:ubuntu-14.04
15+
# webdevops/php-apache:ubuntu-15.04
16+
# webdevops/php-apache:ubuntu-15.10
17+
# webdevops/php-apache:centos-7
18+
#
19+
# Nginx:
20+
# webdevops/php-nginx:ubuntu-12.04
21+
# webdevops/php-nginx:ubuntu-14.04
22+
# webdevops/php-nginx:ubuntu-15.04
23+
# webdevops/php-nginx:ubuntu-15.10
24+
# webdevops/php-nginx:centos-7
25+
#
26+
# HHVM:
27+
# webdevops/hhvm-apache
28+
# webdevops/hhvm-nginx
29+
#
30+
#++++++++++++++++++++++++++++++++++++++
31+
32+
33+
34+
FROM webdevops/php-apache:ubuntu-14.04
35+
FROM webdevops/php-apache:ubuntu-14.04
36+
FROM webdevops/php-apache:ubuntu-14.04
37+
FROM webdevops/php-apache:ubuntu-14.04
38+
39+
ENV PROVISION_CONTEXT "production"
40+
41+
# Deploy scripts/configurations
42+
COPY etc/ /opt/docker/etc/
43+
COPY provision/ /opt/docker/provision/
44+
45+
RUN /opt/docker/bin/control.sh provision.role boilerplate-main \
46+
&& /opt/docker/bin/control.sh provision.role.startup boilerplate-deployment \
47+
&& /opt/docker/bin/control.sh service.enable cron \
48+
&& /opt/docker/bin/control.sh service.enable dnsmasq \
49+
&& /opt/docker/bin/control.sh service.enable postfix \
50+
&& /opt/docker/bin/bootstrap.sh
51+
52+
# Configure volume/workdir
53+
RUN mkdir -p /application/code/
54+
WORKDIR /application/code/

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
The MIT License (MIT)
22

3+
Copyright (c) 2015 WebDevOps
34
Copyright (c) 2015 Markus Blaschke
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy

Makefile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ stop:
2727
state:
2828
docker-compose ps
2929

30+
rebuild:
31+
docker-compose stop
32+
docker-compose rm --force main web
33+
docker-compose build --no-cache
34+
35+
#############################
36+
# Docker cloud
37+
#############################
38+
39+
cloud-build:
40+
docker-compose --file docker-compose-cloud.yml build
41+
docker-compose --file docker-compose-cloud.yml build --no-cache sourcecode
42+
docker-compose --file docker-compose-cloud.yml stop
43+
docker-compose --file docker-compose-cloud.yml rm --force sourcecode
44+
docker-compose --file docker-compose-cloud.yml up -d --force-recreate
45+
3046
#############################
3147
# MySQL
3248
#############################
@@ -61,22 +77,12 @@ restore: mysql-restore solr-restore
6177
build:
6278
bash bin/build.sh
6379

64-
clean:
65-
test -d code/typo3temp && { rm -rf code/typo3temp/*; }
66-
6780
bash:
6881
docker-compose run --rm main bash
6982

7083
root:
7184
docker-compose run --rm main root
7285

73-
#############################
74-
# TYPO3
75-
#############################
76-
77-
scheduler:
78-
docker-compose run --rm main typo3/cli_dispatch.phpsh scheduler $(ARGS)
79-
8086
#############################
8187
# Argument fix workaround
8288
#############################

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can use my [Vagrant Development VM](https://github.com/mblaschke/vagrant-dev
3333

3434
## Table of contents
3535

36-
- [Installation and requirements](/documentation/INSTALL.md)
36+
- [First steps / Installation and requirements](/documentation/INSTALL.md)
3737
- [Updating docker boilerplate](/documentation/UPDATE.md)
3838
- [Customizing](/documentation/CUSTOMIZE.md)
3939
- [Services (Webserver, MySQL... Ports, Users, Passwords)](/documentation/SERVICES.md)
@@ -55,6 +55,9 @@ Thanks for your support, ideas and issues.
5555
- [Benjamin Rau](https://twitter.com/benjamin_rau)
5656
- [Philipp Kitzberger](https://github.com/Kitzberger)
5757
- [Stephan Ferraro](https://github.com/ferraro)
58+
- [Cedric Ziel](https://github.com/cedricziel)
59+
- [Elmar Hinz](https://github.com/elmar-hinz)
60+
5861

5962
Thanks to [cron IT GmbH](http://www.cron.eu/) for inspiration.
6063

bin/entrypoint.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
trap 'echo sigterm ; exit' SIGTERM
4+
trap 'echo sigkill ; exit' SIGKILL
5+
6+
# Fix code rights
7+
chown -R "$EFFECTIVE_UID":"$EFFECTIVE_GID" /docker/code/
8+
9+
#############################
10+
## COMMAND
11+
#############################
12+
13+
if [ "$1" = 'noop' ]; then
14+
while true; do
15+
sleep 1
16+
done
17+
fi
18+
19+
exec "$@"

0 commit comments

Comments
 (0)