Skip to content

Commit d2446c9

Browse files
committed
Renamed main to app container
1 parent 31ec1f1 commit d2446c9

18 files changed

+60
-51
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ PHP Docker Boilerplate Changelog
99
- Real production and development provisioning
1010
- Added cloud support (without host mounted volumes)
1111
- Moved `code/` to `app/` (Moved `/application/code` to `/app` inside Docker container)
12+
- Renamed `main` to `app` container
1213

1314
4.1.0 - canceled
1415
------------------

Dockerfile.cloud

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#++++++++++++++++++++++++++++++++++++++
2-
# Application Docker container
2+
# PHP application Docker container
33
#++++++++++++++++++++++++++++++++++++++
44
#
55
# PHP-Versions:

Dockerfile.development

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#++++++++++++++++++++++++++++++++++++++
2-
# Application Docker container
2+
# PHP application Docker container
33
#++++++++++++++++++++++++++++++++++++++
44
#
55
# PHP-Versions:

Dockerfile.production

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#++++++++++++++++++++++++++++++++++++++
2-
# Application Docker container
2+
# PHP application Docker container
33
#++++++++++++++++++++++++++++++++++++++
44
#
55
# PHP-Versions:

Makefile

+8-7
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,32 @@ state:
2929

3030
rebuild:
3131
docker-compose stop
32-
docker-compose rm --force main web
32+
docker-compose rm --force app
3333
docker-compose build --no-cache
34+
docker-compose up -d
3435

3536
#############################
3637
# MySQL
3738
#############################
3839

3940
mysql-backup:
40-
docker-compose run --rm --no-deps main root bash /docker/bin/backup.sh mysql
41+
docker-compose run --rm --no-deps app root bash /docker/bin/backup.sh mysql
4142

4243
mysql-restore:
43-
docker-compose run --rm --no-deps main root bash /docker/bin/restore.sh mysql
44+
docker-compose run --rm --no-deps app root bash /docker/bin/restore.sh mysql
4445

4546
#############################
4647
# Solr
4748
#############################
4849

4950
solr-backup:
5051
docker-compose stop solr
51-
docker-compose run --rm --no-deps main root bash /docker/bin/backup.sh solr
52+
docker-compose run --rm --no-deps app root bash /docker/bin/backup.sh solr
5253
docker-compose start solr
5354

5455
solr-restore:
5556
docker-compose stop solr
56-
docker-compose run --rm --no-deps main root bash /docker/bin/restore.sh solr
57+
docker-compose run --rm --no-deps app root bash /docker/bin/restore.sh solr
5758
docker-compose start solr
5859

5960
#############################
@@ -67,10 +68,10 @@ build:
6768
bash bin/build.sh
6869

6970
bash:
70-
docker-compose run --rm main bash
71+
docker-compose run --rm app bash
7172

7273
root:
73-
docker-compose run --rm main root
74+
docker-compose run --rm app root
7475

7576
#############################
7677
# Argument fix workaround

docker-compose.cloud.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#######################################
2-
# Main php container
2+
# PHP application Docker container
33
#
44
# for this container you have to remove
55
# following entries from .dockerignore:
@@ -9,7 +9,7 @@
99
# app/*
1010
#
1111
#######################################
12-
main:
12+
app:
1313
build: .
1414
dockerfile: Dockerfile.cloud
1515
links:

docker-compose.development.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#######################################
2-
# Main php container
2+
# PHP application Docker container
33
#######################################
4-
main:
4+
app:
55
build: .
66
dockerfile: Dockerfile.development
77
links:

docker-compose.production.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#######################################
2-
# Main php container
2+
# PHP application Docker container
33
#######################################
4-
main:
4+
app:
55
build: .
66
dockerfile: Dockerfile.production
77
links:

documentation/CUSTOMIZE.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
# Customizing
44

5-
## Custom packages (`main` controller)
6-
7-
You can add custom shell commands in `docker/main/{DISTRIBUTION}/bin/customization.sh`
5+
## Custom packages (`app` controller)
86

7+
You can add custom commands in `Dockerfile.*`
98

109
## Custom php.ini directives
1110

1211
Modify the `etc/php/development.ini` or `etc/php/production.ini`, it will be added on top of the default php.ini so
1312
you can overwrite any directives.
1413

15-
After modification rebuild your `main` container:
14+
After modification rebuild your `app` container:
1615

1716
```bash
1817
docker-compose stop
19-
docker-compose build main
18+
docker-compose build app
2019
docker-compose up -d
2120
```

documentation/DOCKER-INFO.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Container | Description
88
------------------------- | -------------------------------
9-
main | Main container with nginx/apache and PHP-FPM and tools (your entrypoint for bash, php and other stuff)
9+
app | PHP application container with nginx/apache and PHP-FPM and tools (your entrypoint for bash, php and other stuff)
1010
storage | Storage container, eg. for Solr data
1111
mysql | MySQL database
1212
postgres (optional) | PostgreSQL database
@@ -17,15 +17,13 @@ redis (optional) | Redis server
1717
ftps (optional) | FTP server (vsftpd)
1818
mailcatcher (optional) | Mailserver with easy web and REST interface for mailing
1919

20-
This directory will be mounted under `/docker` in `main` and `web` container.
20+
The `app/` directory will be mounted under `/app` inside `app` container.
2121

2222
## Docker images
2323
Container | Source
2424
------------------------- | -------------------------------
25-
main/ubuntu | [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) *official* (prebuilt available from https://hub.docker.com/r/webdevops/php-boilerplate/)
26-
main/centos | [CentOS](https://registry.hub.docker.com/_/centos/) *official* (prebuilt available from https://hub.docker.com/r/webdevops/php-boilerplate/)
25+
app | [WebDevOps Images](https://registry.hub.docker.com/u/webdevops/)
2726
storage | [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) *official*
28-
web | [Apache](https://registry.hub.docker.com/_/httpd/) *official* or [Nginx](https://registry.hub.docker.com/_/nginx/) *official*
2927
mysql | [MySQL](https://registry.hub.docker.com/_/mysql/) *official*
3028
postgres | [PostgreSQL](https://registry.hub.docker.com/_/postgres/) *official*
3129
solr (optional) | [Solr](https://registry.hub.docker.com/u/guywithnose/solr/) from _guywithnose_
@@ -41,7 +39,7 @@ Customize the [Makefile](Makefile) for your needs.
4139

4240
Command | Description
4341
------------------------- | -------------------------------
44-
make bash | Enter main container with bash (user www-data)
42+
make bash | Enter main container with bash (user application)
4543
make root | Enter main container with bash (user root)
4644
<br> |
4745
make backup | General backup (run all backup tasks)

documentation/DOCKER-QUICKSTART.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ Logs (eg. for debugging)
5151
# show all logs
5252
docker-compose logs
5353

54-
# ... or only php
55-
docker-compose logs main
54+
# ... or only php and webserver
55+
docker-compose logs app
5656

57-
# ... or only main and mysql
58-
docker-compose logs main mysql
57+
# ... or only app and mysql
58+
docker-compose logs app mysql
5959
```
6060

6161
CLI script (defined in etc/environment*.yml)
6262

6363
```bash
64-
docker-compose run --rm main cli help
64+
docker-compose run --rm app cli help
6565
```

documentation/PROJECT-EXISTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ Check `DOCUMENT_ROOT` and `DOCUMENT_INDEX` in `etc/environment*.yml`
1919

2020
## Cli runner
2121

22-
You can run one-shot command inside the `main` service container:
22+
You can run one-shot command inside the `app` service container:
2323

2424
```bash
25-
docker-compose run --rm main any-php-file.php argument1 argument2
26-
docker-compose run --rm main bash
25+
docker-compose run --rm app any-php-file.php argument1 argument2
26+
docker-compose run --rm app bash
2727
```
2828

2929
Webserver is available at Port 8000

documentation/PROJECT-OTHER.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
## Cli runner
1212

13-
You can run one-shot command inside the `main` service container:
13+
You can run one-shot command inside the `app` service container:
1414

1515
```bash
16-
docker-compose run --rm main any-php-file.php argument1 argument2
17-
docker-compose run --rm main bash
16+
docker-compose run --rm app any-php-file.php argument1 argument2
17+
docker-compose run --rm app bash
1818
```
1919

2020
Webserver is available at Port 8000

documentation/PROJECT-SYMFONY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ And change `DOCUMENT_ROOT` and `DOCUMENT_ROOT` in `etc/environment*.yml`:
1818
You can run one-shot command inside the `main` service container:
1919

2020
```bash
21-
docker-compose run --rm main php /app/console
22-
docker-compose run --rm main bash
21+
docker-compose run --rm app php /app/console
22+
docker-compose run --rm app bash
2323
```
2424

2525
Webserver is available at Port 8000

documentation/SERVICES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
# Services
44

5-
### Main (Nginx or Apache HTTPd)
5+
### App (PHP with Nginx or Apache HTTPd)
66

77
Setting | Value
88
------------- | -------------
9-
Host | web:80 and web:443 (ssl)
9+
Host | app:80 and app:443 (ssl)
1010
External Port | 8000 and 8443 (ssl)
1111

1212
### MySQL

documentation/TROUBLESHOOTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
## Startup or (docker) linking errors (safe reset)
66

7-
If you got any startup issues you can try to rebuild `main` containers.
7+
If you got any startup issues you can try to rebuild `app` containers.
88
You won't lose any data with this way - it's a safe reset.
99

1010
```bash
1111
docker-compose stop
12-
docker-compose rm --force main
13-
docker-compose build --no-cache main
12+
docker-compose rm --force app
13+
docker-compose build --no-cache app
1414
docker-compose up -d
1515
```
1616

documentation/UPDATE.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,23 @@ update `docker-compose.yml` and `docker-environment.yml`.
1111

1212
For [changes see CHANGELOG.md](/CHANGELOG.md)
1313

14+
## Upgrade to 5.0.x
15+
Because of a huge refactoring you need to rebuild the `app` container. The `web` container isn't used anymore.
16+
17+
```bash
18+
docker-compose stop
19+
docker-compose rm --force app
20+
docker-compose build --no-cache web
21+
docker-compose up
22+
```
23+
1424
## Update to 3.4.x
1525
As `PHP_UID` was replaced with `EFFECTIVE_UID` and `PHP_GID` was replaced with `EFFECTIVE_GID` you
1626
have to rebuild all containers with this variables: `main` and `web`
1727

1828
```bash
1929
docker-compose stop
20-
docker-compose rm --force main web
21-
docker-compose build --no-cache main web
30+
docker-compose rm --force app
31+
docker-compose build --no-cache web
2232
docker-compose up
2333
```
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22

33
- name: Enable services
4-
command: /opt/docker/bin/control.sh service.enable {{ item.service }}
5-
with_items: PROVISION.service
4+
command: "/opt/docker/bin/control.sh service.enable {{ item.service }}"
5+
with_items: "{{ PROVISION.service }}"
66
when: PROVISION.service is defined and item.status == 'enabled'
77

88
- name: Disable services
9-
command: /opt/docker/bin/control.sh service.disable {{ item.service }}
10-
with_items: PROVISION.service
9+
command: "/opt/docker/bin/control.sh service.disable {{ item.service }}"
10+
with_items: "{{ PROVISION.service }}"
1111
when: PROVISION.service is defined and item.status == 'disabled'

0 commit comments

Comments
 (0)