Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

target: php_build
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ Some common tasks are available in the Makefile file (you still can use it to se
To create the docker image and then enter the docker container shell:

```shell
docker image build -t phparkitect .
docker run --rm -it --entrypoint= -v $(PWD):/arkitect phparkitect bash
docker image build --target php_build -t phparkitect .
# or with xdebug
docker image build --target with_xdebug -t phparkitect .
docker run --rm -it --entrypoint= -v "${PWD}":/arkitect phparkitect bash
```

If you prefer use more shorter make commands (use `make` without arguments for help):
Expand All @@ -38,7 +40,7 @@ make dbi
make shell
```

The first time, after the docker container has been created, remember to install the packages with composer:
The first time, after the docker container has been created, remember to install the packages with composer (from inside the container):

```shell
composer install
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ RUN apk add zip git bash make icu-dev
ENV PATH="/arkitect/bin-stub:${PATH}"

ENTRYPOINT [ "phparkitect"]

FROM php_build AS with_xdebug

# compatibility chart: https://xdebug.org/docs/compat
ARG XDEBUG_VERSION="xdebug-3.4.0"
RUN apk add autoconf g++ linux-headers

RUN pecl install ${XDEBUG_VERSION} \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ help: ## it shows help menu
@awk 'BEGIN {FS = ":.*#"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?#/ { printf " \033[36m%-27s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

dbi: ## it creates docker image
docker image build -t phparkitect .
docker image build --target php_build -t phparkitect .

shell: ## it enters into the container
docker run --rm -it --entrypoint= -v $(PWD):/arkitect phparkitect bash
docker run --rm -it --entrypoint= -v "${PWD}":/arkitect phparkitect bash

test: ## it launches tests
bin/phpunit
Expand Down