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 Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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