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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":354:{a:2:{s:7:"defects";a:1:{s:86:"Tests\app\Infrastructure\Controller\GetUserControllerTest::userWithGivenIdDoesNotExist";i:4;}s:5:"times";a:2:{s:94:"Tests\app\Infrastructure\Controller\IsEarlyAdopterUserControllerTest::noUserFoundForGivenEmail";d:1.493;s:86:"Tests\app\Infrastructure\Controller\GetUserControllerTest::userWithGivenIdDoesNotExist";d:1.259;}}}
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
FROM php:7.4-fpm-alpine
FROM php:8.0-fpm-alpine

COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN apk update && apk add git
RUN apk update && \
apk add zsh git vim zsh-autosuggestions zsh-syntax-highlighting bind-tools openssh curl && \
rm -rf /var/cache/apk/*
RUN sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
RUN echo "source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc && \
echo "source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc

RUN docker-php-ext-install pdo pdo_mysql
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,30 @@ Laravel docker
The project must be mounted using docker:

- Start docker daemon

- Run your docker machine: docker-compose up -d


- Go inside the machine:
- docker exec -it laravel-php /bin/zsh


- From inside the machine:
- Run: composer install
- Copy the .env.example to .env
- Run: php artisan key:generate


- Web running on http://localhost:8088


- Api status check running on GET request: http://localhost:8088/api/status


- Swagger running on http://localhost:8082/
- Postman base collection file can be found on src/postman
- phpMyAdmin running on http://localhost:9191
- user: root
- password: secret
- As database we use MySQL:
- database name: laravel
- database user: root
- database password: secret


- Postman base collection file can be found on src/postman


- To stop de container:
docker-compose stop
Expand Down
44 changes: 1 addition & 43 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,6 @@ services:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- mysql
networks:
- laravel

mysql:
image: mysql:5.7.22
container_name: mysql
restart: unless-stopped
tty: true
ports:
- "3306:3306"
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- laravel

phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: laravel-phpmyadmin
depends_on:
- mysql
external_links:
- mysql:db
ports:
- "9191:80"
environment:
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
PMA_HOST: mysql
networks:
- laravel

Expand Down Expand Up @@ -84,9 +47,4 @@ services:
- ./swagger:/usr/share/nginx/html/swagger
environment:
SWAGGER_JSON: /swagger/swagger.json
API_URL: swagger/swagger.json

#Volumes
volumes:
mysql:
driver: local
API_URL: swagger/swagger.json
2 changes: 0 additions & 2 deletions mysql/auto.cnf

This file was deleted.

27 changes: 0 additions & 27 deletions mysql/ca-key.pem

This file was deleted.

19 changes: 0 additions & 19 deletions mysql/ca.pem

This file was deleted.

19 changes: 0 additions & 19 deletions mysql/client-cert.pem

This file was deleted.

27 changes: 0 additions & 27 deletions mysql/client-key.pem

This file was deleted.

72 changes: 0 additions & 72 deletions mysql/ib_buffer_pool

This file was deleted.

Binary file removed mysql/ib_logfile0
Binary file not shown.
Binary file removed mysql/ib_logfile1
Binary file not shown.
Binary file removed mysql/ibdata1
Binary file not shown.
Binary file removed mysql/ibtmp1
Binary file not shown.
2 changes: 0 additions & 2 deletions mysql/laravel/db.opt

This file was deleted.

Binary file removed mysql/laravel/migrations.frm
Binary file not shown.
Binary file removed mysql/laravel/migrations.ibd
Binary file not shown.
Binary file removed mysql/laravel/users.frm
Binary file not shown.
Binary file removed mysql/laravel/users.ibd
Binary file not shown.
Empty file removed mysql/mysql/columns_priv.MYD
Empty file.
Binary file removed mysql/mysql/columns_priv.MYI
Binary file not shown.
Binary file removed mysql/mysql/columns_priv.frm
Binary file not shown.
1 change: 0 additions & 1 deletion mysql/mysql/db.MYD

This file was deleted.

Binary file removed mysql/mysql/db.MYI
Binary file not shown.
Binary file removed mysql/mysql/db.frm
Binary file not shown.
2 changes: 0 additions & 2 deletions mysql/mysql/db.opt

This file was deleted.

Binary file removed mysql/mysql/engine_cost.frm
Binary file not shown.
Binary file removed mysql/mysql/engine_cost.ibd
Binary file not shown.
Empty file removed mysql/mysql/event.MYD
Empty file.
Binary file removed mysql/mysql/event.MYI
Binary file not shown.
Binary file removed mysql/mysql/event.frm
Binary file not shown.
Empty file removed mysql/mysql/func.MYD
Empty file.
Binary file removed mysql/mysql/func.MYI
Binary file not shown.
Binary file removed mysql/mysql/func.frm
Binary file not shown.
Binary file removed mysql/mysql/general_log.CSM
Binary file not shown.
Empty file removed mysql/mysql/general_log.CSV
Empty file.
Binary file removed mysql/mysql/general_log.frm
Binary file not shown.
Binary file removed mysql/mysql/gtid_executed.frm
Binary file not shown.
Binary file removed mysql/mysql/gtid_executed.ibd
Binary file not shown.
Binary file removed mysql/mysql/help_category.frm
Binary file not shown.
Binary file removed mysql/mysql/help_category.ibd
Binary file not shown.
Binary file removed mysql/mysql/help_keyword.frm
Binary file not shown.
Binary file removed mysql/mysql/help_keyword.ibd
Binary file not shown.
Binary file removed mysql/mysql/help_relation.frm
Binary file not shown.
Binary file removed mysql/mysql/help_relation.ibd
Binary file not shown.
Binary file removed mysql/mysql/help_topic.frm
Binary file not shown.
Binary file removed mysql/mysql/help_topic.ibd
Binary file not shown.
Binary file removed mysql/mysql/innodb_index_stats.frm
Binary file not shown.
Binary file removed mysql/mysql/innodb_index_stats.ibd
Binary file not shown.
Binary file removed mysql/mysql/innodb_table_stats.frm
Binary file not shown.
Binary file removed mysql/mysql/innodb_table_stats.ibd
Binary file not shown.
Empty file removed mysql/mysql/ndb_binlog_index.MYD
Empty file.
Binary file removed mysql/mysql/ndb_binlog_index.MYI
Binary file not shown.
Binary file removed mysql/mysql/ndb_binlog_index.frm
Binary file not shown.
Binary file removed mysql/mysql/plugin.frm
Binary file not shown.
Binary file removed mysql/mysql/plugin.ibd
Binary file not shown.
Binary file removed mysql/mysql/proc.MYD
Binary file not shown.
Binary file removed mysql/mysql/proc.MYI
Binary file not shown.
Binary file removed mysql/mysql/proc.frm
Binary file not shown.
Empty file removed mysql/mysql/procs_priv.MYD
Empty file.
Binary file removed mysql/mysql/procs_priv.MYI
Binary file not shown.
Binary file removed mysql/mysql/procs_priv.frm
Binary file not shown.
Binary file removed mysql/mysql/proxies_priv.MYD
Binary file not shown.
Binary file removed mysql/mysql/proxies_priv.MYI
Binary file not shown.
Binary file removed mysql/mysql/proxies_priv.frm
Binary file not shown.
Binary file removed mysql/mysql/server_cost.frm
Binary file not shown.
Binary file removed mysql/mysql/server_cost.ibd
Binary file not shown.
Binary file removed mysql/mysql/servers.frm
Binary file not shown.
Binary file removed mysql/mysql/servers.ibd
Binary file not shown.
Binary file removed mysql/mysql/slave_master_info.frm
Binary file not shown.
Binary file removed mysql/mysql/slave_master_info.ibd
Binary file not shown.
Binary file removed mysql/mysql/slave_relay_log_info.frm
Binary file not shown.
Binary file removed mysql/mysql/slave_relay_log_info.ibd
Binary file not shown.
Binary file removed mysql/mysql/slave_worker_info.frm
Binary file not shown.
Binary file removed mysql/mysql/slave_worker_info.ibd
Binary file not shown.
Binary file removed mysql/mysql/slow_log.CSM
Binary file not shown.
Empty file removed mysql/mysql/slow_log.CSV
Empty file.
Binary file removed mysql/mysql/slow_log.frm
Binary file not shown.
Binary file removed mysql/mysql/tables_priv.MYD
Binary file not shown.
Binary file removed mysql/mysql/tables_priv.MYI
Binary file not shown.
Binary file removed mysql/mysql/tables_priv.frm
Binary file not shown.
Binary file removed mysql/mysql/time_zone.frm
Binary file not shown.
Binary file removed mysql/mysql/time_zone.ibd
Binary file not shown.
Binary file removed mysql/mysql/time_zone_leap_second.frm
Binary file not shown.
Binary file removed mysql/mysql/time_zone_leap_second.ibd
Binary file not shown.
Binary file removed mysql/mysql/time_zone_name.frm
Binary file not shown.
Binary file removed mysql/mysql/time_zone_name.ibd
Binary file not shown.
Binary file removed mysql/mysql/time_zone_transition.frm
Binary file not shown.
Binary file removed mysql/mysql/time_zone_transition.ibd
Binary file not shown.
Binary file removed mysql/mysql/time_zone_transition_type.frm
Binary file not shown.
Binary file removed mysql/mysql/time_zone_transition_type.ibd
Binary file not shown.
Binary file removed mysql/mysql/user.MYD
Binary file not shown.
Binary file removed mysql/mysql/user.MYI
Binary file not shown.
Binary file removed mysql/mysql/user.frm
Binary file not shown.
Binary file removed mysql/performance_schema/accounts.frm
Binary file not shown.
Binary file removed mysql/performance_schema/cond_instances.frm
Binary file not shown.
2 changes: 0 additions & 2 deletions mysql/performance_schema/db.opt

This file was deleted.

Binary file removed mysql/performance_schema/events_stages_current.frm
Binary file not shown.
Binary file removed mysql/performance_schema/events_stages_history.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/events_waits_current.frm
Binary file not shown.
Binary file removed mysql/performance_schema/events_waits_history.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/file_instances.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/global_status.frm
Binary file not shown.
Binary file removed mysql/performance_schema/global_variables.frm
Binary file not shown.
Binary file removed mysql/performance_schema/host_cache.frm
Binary file not shown.
Binary file removed mysql/performance_schema/hosts.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/metadata_locks.frm
Binary file not shown.
Binary file removed mysql/performance_schema/mutex_instances.frm
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/performance_timers.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/rwlock_instances.frm
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/session_connect_attrs.frm
Binary file not shown.
Binary file removed mysql/performance_schema/session_status.frm
Binary file not shown.
Binary file removed mysql/performance_schema/session_variables.frm
Binary file not shown.
Binary file removed mysql/performance_schema/setup_actors.frm
Binary file not shown.
Binary file removed mysql/performance_schema/setup_consumers.frm
Binary file not shown.
Binary file removed mysql/performance_schema/setup_instruments.frm
Binary file not shown.
Binary file removed mysql/performance_schema/setup_objects.frm
Binary file not shown.
Binary file removed mysql/performance_schema/setup_timers.frm
Binary file not shown.
Binary file removed mysql/performance_schema/socket_instances.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/status_by_account.frm
Binary file not shown.
Binary file removed mysql/performance_schema/status_by_host.frm
Binary file not shown.
Binary file removed mysql/performance_schema/status_by_thread.frm
Binary file not shown.
Binary file removed mysql/performance_schema/status_by_user.frm
Binary file not shown.
Binary file removed mysql/performance_schema/table_handles.frm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/threads.frm
Binary file not shown.
Binary file not shown.
Binary file removed mysql/performance_schema/users.frm
Binary file not shown.
Binary file removed mysql/performance_schema/variables_by_thread.frm
Binary file not shown.
27 changes: 0 additions & 27 deletions mysql/private_key.pem

This file was deleted.

9 changes: 0 additions & 9 deletions mysql/public_key.pem

This file was deleted.

19 changes: 0 additions & 19 deletions mysql/server-cert.pem

This file was deleted.

27 changes: 0 additions & 27 deletions mysql/server-key.pem

This file was deleted.

2 changes: 0 additions & 2 deletions mysql/sys/db.opt

This file was deleted.

Loading