Skip to content

Commit ddd283a

Browse files
committed
Merge branch 'release/3.2.0'
2 parents 9e28e3f + 9645fdf commit ddd283a

File tree

7 files changed

+46
-6
lines changed

7 files changed

+46
-6
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Dockerized PHP web project boilerplate
22

3+
![latest v3.0.0](https://img.shields.io/badge/latest-v3.0.0-green.svg?style=flat)
4+
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)
5+
36
This is a boilerplate utilizing Docker based with support
47
for **TYPO3_CONTEXT** and **FLOW_CONTEXT** for TYPO3, FLOW, NEOS.
58
It also supports Symfony and any other PHP base project.
@@ -35,6 +38,8 @@ Use can use my [Vagrant Development VM](https://github.com/mblaschke/vagrant-dev
3538
If you want to run a Docker VM make sure you're using VMware or Parallels Desktop because of
3639
the much faster virtualisation (networking, disk access, shared folders) compared to VirtualBox.
3740

41+
For more convenience use [CliTools.phar](https://github.com/mblaschke/vagrant-clitools) (will also run on native Linux, not only Vagrant)
42+
3843
## Docker short introduction
3944

4045
Create and start containers (eg. first start):
@@ -185,6 +190,8 @@ Port | 11211
185190
Environment | Description
186191
--------------------- | -------------
187192
DOCUMENT_ROOT | Document root for Nginx and Apache HTTPD, can be absolute or relative (to /docker inside the container).
193+
DOCUMENT_INDEX | Default document index file for Nginx and Apache HTTPd
194+
CLI_SCRIPT | Target for "cli" command of main container
188195
<br> |
189196
TYPO3_CONTEXT | Context for TYPO3, can be used for TypoScript conditions and AdditionalConfiguration
190197
FLOW_CONTEXT | Context for FLOW and NEOS
@@ -196,6 +203,10 @@ MYSQL_ROOT_PASSWORD | Password for MySQL user "root"
196203
MYSQL_USER | Initial created MySQL user
197204
MYSQL_PASSWORD | Password for initial MySQL user
198205
MYSQL_DATABASE | Initial created MySQL database
206+
<br> |
207+
PHP_TIMEZONE | Timezone (date.timezone) setting for PHP (cli and fpm)
208+
PHP_UID | Effective UID for www-data (cli and fpm)
209+
PHP_GID | Effective GID for www-data (cli and fpm)
199210

200211
### Xdebug Remote debugger (PhpStorm)
201212

docker-env.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,36 @@
1+
# Settings: TYPO3 CMS
12
DOCUMENT_ROOT=code/
23
DOCUMENT_INDEX=index.php
4+
CLI_SCRIPT=php typo3/cli_dispatch.phpsh
35

6+
# Settings: NEOS or FLOW
7+
#DOCUMENT_ROOT=code/Web/
8+
#DOCUMENT_INDEX=index.php
9+
#CLI_SCRIPT=php flow
10+
11+
# Settings: SYMFONY FRAMEWORK
12+
#DOCUMENT_ROOT=code/web/
13+
#DOCUMENT_INDEX=app_dev.php
14+
#CLI_SCRIPT=php app/console
15+
16+
# Contexts environment
417
TYPO3_CONTEXT=Development/Docker
518
FLOW_CONTEXT=Development/Docker
619
FLOW_REWRITEURLS=1
20+
SYMFONY_ENV=dev
21+
SYMFONY_DEBUG=0
722

23+
# Service settings
824
MAIL_GATEWAY=192.168.56.2
925
DNS_DOMAIN=vm vm.dev
1026

27+
# MySQL settings
1128
MYSQL_ROOT_PASSWORD=dev
1229
MYSQL_USER=dev
1330
MYSQL_PASSWORD=dev
1431
MYSQL_DATABASE=typo3
1532

33+
# PHP Settings
1634
PHP_TIMEZONE=UTC
1735
PHP_UID=1000
1836
PHP_GID=1000

docker/main/bin/dnsmasq.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function dnsmasq_start() {
4141
echo "nameserver 127.0.0.1" > /etc/resolv.conf
4242

4343
## wait for 10 hours
44-
sleep 36000
44+
sleep 10h
4545
}
4646

4747
## Fetch IP from services

docker/main/bin/init-system.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
22

33
## Set uid/gid for www-data user
4-
usermod --uid "${PHP_UID}" --shell /bin/bash --home /home www-data
5-
groupmod --gid "${PHP_GID}" www-data
4+
usermod --uid "${PHP_UID}" --shell /bin/bash --home /home www-data > /dev/null
5+
groupmod --gid "${PHP_GID}" www-data > /dev/null

docker/main/entrypoint.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ case "$1" in
4444
fi
4545
;;
4646

47+
## Defined cli script
48+
cli)
49+
if [ -n "${CLI_SCRIPT}" ]; then
50+
shift
51+
exec ${CLI_SCRIPT} "$@"
52+
else
53+
echo "[ERROR] No CLI_SCRIPT in docker-env.yml defined"
54+
exit 1
55+
fi
56+
;;
57+
4758
## All other commands
4859
*)
4960
## Set home dir (workaround)

docker/storage/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ RUN chmod -R 777 /data
99
VOLUME "/data"
1010

1111
ENTRYPOINT ["/entrypoint.sh"]
12-
CMD ["none"]
12+
CMD ["noop"]

docker/storage/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ find /data/dns/ -type f -exec rm -rf {} \;
1919
## COMMAND
2020
#############################
2121

22-
if [ "$1" = 'none' ]; then
23-
exit 0
22+
if [ "$1" = 'noop' ]; then
23+
exec sleep 10000d
2424
fi
2525

2626
exec "$@"

0 commit comments

Comments
 (0)