diff --git a/Dockerfile b/Dockerfile index dd0f725b..a2b291d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /app RUN apk --update upgrade \ && apk add --no-cache autoconf automake make gcc g++ git bash icu-dev libzip-dev rabbitmq-c rabbitmq-c-dev linux-headers -RUN pecl install apcu-5.1.23 && pecl install amqp-2.1.1 && pecl install xdebug-3.3.0 +RUN pecl install apcu-5.1.23 && pecl install amqp-2.1.1 && pecl install xdebug-3.4.2 RUN docker-php-ext-install -j$(nproc) \ bcmath \ diff --git a/Makefile b/Makefile index efec06c2..a01df7f0 100644 --- a/Makefile +++ b/Makefile @@ -50,5 +50,5 @@ ping-rabbitmq: @docker exec codely-php_ddd_skeleton-rabbitmq rabbitmqctl ping --silent clean-cache: - @rm -rf apps/*/*/var + @rm -rf apps/*/*/var/* @docker exec codely-php_ddd_skeleton-mooc_backend-php ./apps/mooc/backend/bin/console cache:warmup diff --git a/README.md b/README.md index 85d72efb..6fbde5dd 100644 --- a/README.md +++ b/README.md @@ -50,16 +50,18 @@ ### 🔥 Application execution -1. Install all the dependencies and bring up the project with Docker executing: `make build` -2. Then you'll have 3 apps available (2 APIs and 1 Frontend): +1. Install all the dependencies (runs Composer inside Docker, no local PHP needed): `make composer-install` +2. Bring up the project with Docker: `make start` +3. Then you'll have 3 apps available (2 APIs and 1 Frontend): 1. [Mooc Backend](apps/mooc/backend): http://localhost:8030/health-check 2. [Backoffice Backend](apps/backoffice/backend): http://localhost:8040/health-check 3. [Backoffice Frontend](apps/backoffice/frontend): http://localhost:8041/health-check ### ✅ Tests execution -1. Install the dependencies if you haven't done it previously: `make deps` +1. Install the dependencies and start the containers if you haven't done it previously: `make composer-install && make start` 2. Execute PHPUnit and Behat tests: `make test` +3. Stop the containers when you're done: `make stop` ## 👩‍💻 Project explanation diff --git a/docker-compose.yml b/docker-compose.yml index 19fc0366..568b3fb1 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,7 +67,7 @@ services: - shared_rabbitmq - shared_prometheus - backoffice_elasticsearch - command: symfony serve --dir=apps/backoffice/backend/public --port=8040 + command: symfony serve --dir=apps/backoffice/backend/public --port=8040 --allow-all-ip backoffice_frontend_php: container_name: codely-php_ddd_skeleton-backoffice_frontend-php @@ -86,7 +86,7 @@ services: - shared_prometheus - backoffice_elasticsearch - mooc_mysql - command: symfony serve --dir=apps/backoffice/frontend/public --port=8041 + command: symfony serve --dir=apps/backoffice/frontend/public --port=8041 --allow-all-ip mooc_backend_php: container_name: codely-php_ddd_skeleton-mooc_backend-php @@ -104,4 +104,4 @@ services: - shared_rabbitmq - shared_prometheus - mooc_mysql - command: symfony serve --dir=apps/mooc/backend/public --port=8030 + command: symfony serve --dir=apps/mooc/backend/public --port=8030 --allow-all-ip