Skip to content

Commit 4f8360f

Browse files
committed
Merge branch 'release/5.2.0-beta3'
2 parents 9342957 + 94f1f2d commit 4f8360f

8 files changed

+216
-15
lines changed

CHANGELOG.md

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

4-
5.2.0-beta1 - 2016-12-06
4+
5.2.0-beta3 - 2017-01-18
5+
------------------------
6+
- Reverted changes in docker-compose.development.yml (ports)
7+
- Introducted docker-compose.development-reverse-proxy.yml for reverse proxy usage
8+
9+
5.2.0-beta2 - 2016-12-06
510
------------------------
611
- Remove port exposures
712
- DEV: Redirect all mails to mailcatcher (see environment var POSTFIX_RELAYHOST)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![PHP Docker Boilerplate](https://static.webdevops.io/php-docker-boilerplate.svg)
22

3-
[![latest v5.2.0-beta2](https://img.shields.io/badge/latest-v5.2.0-beta2-green.svg?style=flat)](https://github.com/webdevops/php-docker-boilerplate/releases/tag/5.2.0-beta2)
3+
[![latest v5.2.0-beta3](https://img.shields.io/badge/latest-v5.2.0_beta3-green.svg?style=flat)](https://github.com/webdevops/php-docker-boilerplate/releases/tag/5.2.0-beta3)
44
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)
55

66
This is an easy customizable docker boilerplate for any PHP-based projects like _Symfony Framework_, _CakePHP_, _Yii_ and many other frameworks or applications.

bin/backup.sh

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ case "$1" in
2626
fi
2727

2828
logMsg "Starting MySQL backup..."
29-
dockerExec mysqldump --opt --single-transaction --events --all-databases --routines --comments | bzip2 > "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}"
29+
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../etc/environment.yml"
30+
dockerExec mysqldump -h mysql -u root -p"${MYSQL_ROOT_PASSWORD}" --opt --single-transaction --events --all-databases --routines --comments | bzip2 > "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}"
3031
logMsg "Finished"
3132
else
3233
echo " * Skipping mysql backup, no such container"

bin/restore.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ case "$1" in
2222
if [[ -n "$(dockerContainerId mysql)" ]]; then
2323
if [ -f "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" ]; then
2424
logMsg "Starting MySQL restore..."
25-
bzcat "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" | dockerExec mysql
26-
echo "FLUSH PRIVILEGES;" | dockerExec mysql
25+
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../etc/environment.yml"
26+
bzcat "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" | dockerExec mysql -h mysql -u root -p"${MYSQL_ROOT_PASSWORD}"
27+
echo "FLUSH PRIVILEGES;" | dockerExec mysql -h mysql -u root -p"${MYSQL_ROOT_PASSWORD}"
2728
logMsg "Finished"
2829
else
2930
errorMsg "MySQL backup file not found"
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
version: '2'
2+
services:
3+
#######################################
4+
# PHP application Docker container
5+
#######################################
6+
app:
7+
build:
8+
context: .
9+
dockerfile: Dockerfile.development
10+
links:
11+
- mail
12+
- mysql
13+
#- postgres
14+
#- solr
15+
#- elasticsearch
16+
#- redis
17+
#- memcached
18+
#- ftp
19+
#ports:
20+
# - "8000:80"
21+
# - "8443:443"
22+
# - "10022:22"
23+
volumes:
24+
- ./app/:/app/
25+
- ./:/docker/
26+
volumes_from:
27+
- storage
28+
# cap and privileged needed for slowlog
29+
cap_add:
30+
- SYS_PTRACE
31+
privileged: true
32+
env_file:
33+
- etc/environment.yml
34+
- etc/environment.development.yml
35+
environment:
36+
- VIRTUAL_HOST=.app.boilerplate.docker
37+
- VIRTUAL_PORT=80
38+
- POSTFIX_RELAYHOST=[mail]:1025
39+
40+
41+
#######################################
42+
# MySQL server
43+
#######################################
44+
mysql:
45+
build:
46+
context: docker/mysql/
47+
#dockerfile: MySQL-5.5.Dockerfile
48+
dockerfile: MySQL-5.6.Dockerfile
49+
#dockerfile: MySQL-5.7.Dockerfile
50+
#dockerfile: MariaDB-5.5.Dockerfile
51+
#dockerfile: MariaDB-10.Dockerfile
52+
#dockerfile: Percona-5.5.Dockerfile
53+
#dockerfile: Percona-5.6.Dockerfile
54+
#dockerfile: Percona-5.7.Dockerfile
55+
#ports:
56+
# - 13306:3306
57+
volumes_from:
58+
- storage
59+
env_file:
60+
- etc/environment.yml
61+
- etc/environment.development.yml
62+
63+
#######################################
64+
# PostgreSQL server
65+
#######################################
66+
#postgres:
67+
# build:
68+
# context: docker/postgres/
69+
# dockerfile: Postgres-9.4.Dockerfile
70+
# dockerfile: Postgres-9.5.Dockerfile
71+
# ports:
72+
# - 15432:5432
73+
# volumes_from:
74+
# - storage
75+
# env_file:
76+
# - etc/environment.yml
77+
# - etc/environment.development.yml
78+
79+
#######################################
80+
# Solr server
81+
#######################################
82+
#solr:
83+
# build:
84+
# context: docker/solr/
85+
# volumes_from:
86+
# - storage
87+
# env_file:
88+
# - etc/environment.yml
89+
# - etc/environment.development.yml
90+
# environment:
91+
# - SOLR_STORAGE=/storage/solr/server-master/
92+
# - VIRTUAL_HOST=solr.boilerplate.docker
93+
# - VIRTUAL_PORT=8983
94+
95+
#######################################
96+
# Elasticsearch
97+
#######################################
98+
#elasticsearch:
99+
# build:
100+
# context: docker/elasticsearch/
101+
# ports:
102+
# - 19200:9200
103+
# - 19300:9300
104+
# volumes_from:
105+
# - storage
106+
# env_file:
107+
# - etc/environment.yml
108+
# - etc/environment.development.yml
109+
# environment:
110+
# - VIRTUAL_HOST=elasticsearch.boilerplate.docker
111+
# - VIRTUAL_PORT=9200
112+
113+
#######################################
114+
# Redis
115+
#######################################
116+
#redis:
117+
# build:
118+
# context: docker/redis/
119+
# volumes_from:
120+
# - storage
121+
# env_file:
122+
# - etc/environment.yml
123+
# - etc/environment.development.yml
124+
125+
#######################################
126+
# Memcached
127+
#######################################
128+
#memcached:
129+
# build:
130+
# context: docker/memcached/
131+
# volumes_from:
132+
# - storage
133+
# env_file:
134+
# - etc/environment.yml
135+
# - etc/environment.development.yml
136+
137+
#######################################
138+
# Mail
139+
#######################################
140+
# Mailhog
141+
mail:
142+
image: mailhog/mailhog
143+
# ports:
144+
# - 8025:8025
145+
environment:
146+
- VIRTUAL_HOST=mail.boilerplate.docker
147+
- VIRTUAL_PORT=8025
148+
149+
# Mailcatcher
150+
#mail:
151+
# image: schickling/mailcatcher
152+
# environment:
153+
# - VIRTUAL_HOST=mail.boilerplate.docker
154+
# - VIRTUAL_PORT=1080
155+
156+
157+
# Mailsandbox
158+
#mail:
159+
# image: webdevops/mail-sandbox
160+
# environment:
161+
# - VIRTUAL_HOST=mail.boilerplate.docker
162+
# - VIRTUAL_PORT=80
163+
164+
#######################################
165+
# FTP (vsftpd)
166+
#######################################
167+
#ftp:
168+
# build:
169+
# context: docker/vsftpd/
170+
# volumes_from:
171+
# - storage
172+
# volumes:
173+
# - ./:/application/
174+
# env_file:
175+
# - etc/environment.yml
176+
# - etc/environment.development.yml
177+
178+
#######################################
179+
# phpMyAdmin
180+
#######################################
181+
#phpmyadmin:
182+
# image: phpmyadmin/phpmyadmin
183+
# links:
184+
# - mysql
185+
# environment:
186+
# - PMA_ARBITRARY=1
187+
# - VIRTUAL_HOST=pma.boilerplate.docker
188+
# - VIRTUAL_PORT=80
189+
# volumes:
190+
# - /sessions
191+
192+
#######################################
193+
# Storage
194+
#######################################
195+
storage:
196+
build:
197+
context: docker/storage/
198+
volumes:
199+
- /storage

docker-compose.development.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ services:
1616
#- redis
1717
#- memcached
1818
#- ftp
19-
#ports:
20-
# - "8000:80"
21-
# - "8443:443"
22-
# - "10022:22"
19+
ports:
20+
- "8000:80"
21+
- "8443:443"
22+
- "10022:22"
2323
volumes:
2424
- ./app/:/app/
25-
- /tmp/debug/:/tmp/debug/
2625
- ./:/docker/
2726
volumes_from:
2827
- storage
@@ -57,8 +56,6 @@ services:
5756
- 13306:3306
5857
volumes_from:
5958
- storage
60-
volumes:
61-
- /tmp/debug/:/tmp/debug/
6259
env_file:
6360
- etc/environment.yml
6461
- etc/environment.development.yml

docker-compose.production.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ services:
4444
#dockerfile: Percona-5.7.Dockerfile
4545
volumes_from:
4646
- storage
47-
volumes:
48-
- /tmp/debug/:/tmp/debug/
4947
env_file:
5048
- etc/environment.yml
5149
- etc/environment.production.yml

etc/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# General
1313
WEB_DOCUMENT_ROOT=/app/
1414
WEB_DOCUMENT_INDEX=index.php
15-
CLI_SCRIPT=php /app/index.php
15+
CLI_SCRIPT="php /app/index.php"
1616

1717
#######################################
1818
# SSH settings

0 commit comments

Comments
 (0)