Skip to content

Commit 7c8cb0a

Browse files
committed
Make php-fpm listen on public ports for dev
Allows external access eg. for xdebug debugger Fixes #89
1 parent 243d38a commit 7c8cb0a

File tree

289 files changed

+1558
-28
lines changed

Some content is hidden

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

289 files changed

+1558
-28
lines changed

docker/php-apache-dev/alpine-3-php7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN /usr/local/bin/apk-install \
2828
s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \
2929
s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \
3030
' /etc/apache2/httpd.conf \
31-
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-apache --role webdevops-php-apache \
31+
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-apache --role webdevops-php-apache --role webdevops-php-apache-dev \
3232
&& /opt/docker/bin/bootstrap.sh
3333

3434

docker/php-apache-dev/alpine-3-php7/Dockerfile.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
{{ docker.copy('conf/', '/opt/docker/') }}
1010

11-
{{ apache.alpine('php-apache') }}
11+
{{ apache.alpine('php-apache php-apache-dev') }}
1212

1313
{{ docker.expose('80 443') }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
APPLICATION_USER: "{{ lookup('env','APPLICATION_USER') }}"
4+
APPLICATION_GROUP: "{{ lookup('env','APPLICATION_GROUP') }}"
5+
APPLICATION_UID: "{{ lookup('env','APPLICATION_UID') }}"
6+
APPLICATION_GID: "{{ lookup('env','APPLICATION_GID') }}"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
- include: bootstrap/php-fpm.yml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
- name: Open php-fpm for external connections (eg. debuggers)
4+
lineinfile:
5+
dest: '/opt/docker/etc/php/fpm/pool.d/application.conf'
6+
regexp: '^[\s;]*{{ item.key }}[\s]*='
7+
line: '{{ item.key }} = {{ item.value }}'
8+
with_items:
9+
- { key: 'listen', value: "0.0.0.0:9000" }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
- include: bootstrap.yml
4+
tags:
5+
- bootstrap

docker/php-apache-dev/alpine-3-php7/conf/provision/roles/webdevops-php-dev/tasks/bootstrap/php-fpm.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@
77
line: '{{ item.key }} = {{ item.value }}'
88
with_items:
99
- { key: "access.format", value: '"%R - %u %t \"%m %r%Q%q\" %s %f cpu:%C%% mem:%{megabytes}M reqTime:%d"' }
10+
11+
- name: Open php-fpm for external connections (eg. debuggers)
12+
lineinfile:
13+
dest: '/opt/docker/etc/php/fpm/pool.d/application.conf'
14+
regexp: '^[\s;]*{{ item.key }}[\s]*='
15+
line: '{{ item.key }} = {{ item.value }}'
16+
with_items:
17+
- { key: 'listen', value: "0.0.0.0:9000" }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22

33
- include: bootstrap/nginx.yml
4+
- include: bootstrap/php-fpm.yml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
- name: Open php-fpm for external connections (eg. debuggers)
4+
lineinfile:
5+
dest: '/opt/docker/etc/php/fpm/pool.d/application.conf'
6+
regexp: '^[\s;]*{{ item.key }}[\s]*='
7+
line: '{{ item.key }} = {{ item.value }}'
8+
with_items:
9+
- { key: 'listen', value: "0.0.0.0:9000" }

docker/php-apache-dev/alpine-3/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN /usr/local/bin/apk-install \
2828
s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \
2929
s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \
3030
' /etc/apache2/httpd.conf \
31-
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-apache --role webdevops-php-apache \
31+
&& /opt/docker/bin/provision run --tag bootstrap --role webdevops-apache --role webdevops-php-apache --role webdevops-php-apache-dev \
3232
&& /opt/docker/bin/bootstrap.sh
3333

3434

0 commit comments

Comments
 (0)