diff --git a/Makefile b/Makefile index 54cacca..7aa9a8b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ export DOCKER_BUILDKIT ?= 1 export COMPOSE_DOCKER_CLI_BUILD ?= 1 IMAGE_NAMESPACE ?= wayofdev/php-base -IMAGE_TEMPLATE ?= 8.1-supervisord-alpine +IMAGE_TEMPLATE ?= 8.3-fpm-alpine IMAGE_TAG ?= $(IMAGE_NAMESPACE):$(IMAGE_TEMPLATE)-latest DOCKERFILE_DIR ?= ./dist/base/$(IMAGE_TEMPLATE) diff --git a/src/Dockerfiles/base/goss_wait_fpm.yaml b/src/Dockerfiles/base/goss_wait_fpm.yaml new file mode 100644 index 0000000..ce09ffe --- /dev/null +++ b/src/Dockerfiles/base/goss_wait_fpm.yaml @@ -0,0 +1,7 @@ +--- + +process: + php-fpm: + running: true + +... diff --git a/src/Dockerfiles/base/goss_wait.yaml b/src/Dockerfiles/base/goss_wait_supervisord.yaml similarity index 100% rename from src/Dockerfiles/base/goss_wait.yaml rename to src/Dockerfiles/base/goss_wait_supervisord.yaml diff --git a/src/group_vars/base.yml b/src/group_vars/base.yml index d14592a..47648f6 100644 --- a/src/group_vars/base.yml +++ b/src/group_vars/base.yml @@ -72,8 +72,12 @@ tpl_docker_tests: - src: Dockerfiles/base/goss.yaml.j2 dst: "../dist/base/{{ php_version }}-{{ php_type }}-{{ os_name }}/goss.yaml" -tpl_docker_supervisor_tests: - - src: Dockerfiles/base/goss_wait.yaml +tpl_docker_fpm_tests: + - src: Dockerfiles/base/goss_wait_fpm.yaml + dst: "../dist/base/{{ php_version }}-fpm-{{ os_name }}/goss_wait.yaml" + +tpl_docker_supervisord_tests: + - src: Dockerfiles/base/goss_wait_supervisord.yaml dst: "../dist/base/{{ php_version }}-supervisord-{{ os_name }}/goss_wait.yaml" diff --git a/src/roles/base/main.yml b/src/roles/base/main.yml index 086f678..477a8b9 100644 --- a/src/roles/base/main.yml +++ b/src/roles/base/main.yml @@ -73,7 +73,18 @@ mode: "0644" with_items: - "{{ tpl_docker_tests }}" - when: php_type != 'supervisord' + when: php_type == 'cli' + +- name: Generate Dockerfile Goss tests for fpm + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dst }}" + force: true + mode: "0644" + with_items: + - "{{ tpl_docker_tests }}" + - "{{ tpl_docker_fpm_tests }}" + when: php_type == 'fpm' - name: Generate Dockerfile Goss tests for supervisord ansible.builtin.template: @@ -83,7 +94,7 @@ mode: "0644" with_items: - "{{ tpl_docker_tests }}" - - "{{ tpl_docker_supervisor_tests }}" + - "{{ tpl_docker_supervisord_tests }}" when: php_type == 'supervisord' ...