Skip to content

Commit

Permalink
Updated composer dependencies, added fish shell, bash completion.
Browse files Browse the repository at this point in the history
  • Loading branch information
DKravtsov committed Aug 21, 2024
1 parent 5c5d5a3 commit a3f5548
Show file tree
Hide file tree
Showing 29 changed files with 2,422 additions and 1,996 deletions.
6 changes: 0 additions & 6 deletions .idea/codeception.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/htdocs.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/php-test-framework.xml

This file was deleted.

233 changes: 116 additions & 117 deletions .idea/php.xml

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions .idea/phpspec.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ RUN if [ "$BUILD_ARGUMENT_ENV" = "default" ]; then echo "Set BUILD_ARGUMENT_ENV

# install all the dependencies and enable PHP modules
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
bash-completion \
fish \
procps \
nano \
git \
Expand Down Expand Up @@ -82,6 +84,9 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN chmod +x /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1

# Enable Composer autocompletion
RUN composer completion bash > /etc/bash_completion.d/composer

# add supervisor
RUN mkdir -p /var/log/supervisor
COPY --chown=root:root ./docker/general/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
Expand All @@ -97,6 +102,15 @@ WORKDIR $APP_HOME

USER ${USERNAME}

# Add necessary stuff to bash autocomplete
RUN echo 'source /usr/share/bash-completion/bash_completion' >> /home/${USERNAME}/.bashrc \
&& echo 'alias artisan="php /var/www/html/artisan"' >> /home/${USERNAME}/.bashrc

# copy fish configs
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/completions/ /home/${USERNAME}/.config/fish/completions/
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/functions/ /home/${USERNAME}/.config/fish/functions/
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/config.fish /home/${USERNAME}/.config/fish/config.fish

# copy source files and config file
COPY --chown=${USERNAME}:${USERNAME} . $APP_HOME/
COPY --chown=${USERNAME}:${USERNAME} .env.$ENV $APP_HOME/.env
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ else
$(ERROR_ONLY_FOR_HOST)
endif

fish: ## Get fish shell inside laravel docker container
ifeq ($(INSIDE_DOCKER_CONTAINER), 0)
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) WEB_PORT_HTTP=$(WEB_PORT_HTTP) WEB_PORT_SSL=$(WEB_PORT_SSL) XDEBUG_CONFIG=$(XDEBUG_CONFIG) XDEBUG_VERSION=$(XDEBUG_VERSION) MYSQL_VERSION=$(MYSQL_VERSION) INNODB_USE_NATIVE_AIO=$(INNODB_USE_NATIVE_AIO) SQL_MODE=$(SQL_MODE) docker compose $(PROJECT_NAME) exec $(OPTION_T) $(PHP_USER) laravel fish
else
$(ERROR_ONLY_FOR_HOST)
endif

ssh-supervisord: ## Get bash inside supervisord docker container (cron jobs running there, etc...)
ifeq ($(INSIDE_DOCKER_CONTAINER), 0)
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) WEB_PORT_HTTP=$(WEB_PORT_HTTP) WEB_PORT_SSL=$(WEB_PORT_SSL) XDEBUG_CONFIG=$(XDEBUG_CONFIG) XDEBUG_VERSION=$(XDEBUG_VERSION) MYSQL_VERSION=$(MYSQL_VERSION) INNODB_USE_NATIVE_AIO=$(INNODB_USE_NATIVE_AIO) SQL_MODE=$(SQL_MODE) docker compose $(PROJECT_NAME) exec supervisord bash
Expand Down
1 change: 1 addition & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory;
use Notifiable;

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"barryvdh/laravel-ide-helper": "^3.0",
"barryvdh/laravel-ide-helper": "^3.1",
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"neronmoon/scriptsdev": "^0.1",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "11.2.*",
"phpunit/phpunit": "11.3.*",
"roave/security-advisories": "dev-latest"
},
"config": {
Expand Down
Loading

0 comments on commit a3f5548

Please sign in to comment.