Skip to content

Commit

Permalink
Improved environment configuration, updated composer dependencies and…
Browse files Browse the repository at this point in the history
… documentation.
  • Loading branch information
DKravtsov committed Nov 20, 2022
1 parent 7053ad3 commit d01007a
Show file tree
Hide file tree
Showing 36 changed files with 1,639 additions and 1,514 deletions.
9 changes: 9 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
###> docker configuration ###
WEB_PORT_HTTP=80
WEB_PORT_SSL=443
# XDEBUG_CONFIG possible values: main|osx. Use main value for Linux and Windows, osx value for MacOS.
XDEBUG_CONFIG=main
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
INNODB_USE_NATIVE_AIO=1
###< docker configuration ###

APP_NAME=Laravel
APP_ENV=dev
APP_KEY=base64:KgeWah2LwOk5HLjCYuIZjaQQwX59ASqUjCKZMD6H4Ew=
Expand Down
7 changes: 7 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
###> docker configuration ###
WEB_PORT_HTTP=80
WEB_PORT_SSL=443
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
INNODB_USE_NATIVE_AIO=1
###< docker configuration ###

APP_NAME=Laravel
APP_ENV=prod
APP_KEY=
Expand Down
7 changes: 7 additions & 0 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
###> docker configuration ###
WEB_PORT_HTTP=80
WEB_PORT_SSL=443
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
INNODB_USE_NATIVE_AIO=1
###< docker configuration ###

APP_NAME=Laravel
APP_ENV=staging
APP_KEY=
Expand Down
9 changes: 9 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
###> docker configuration ###
WEB_PORT_HTTP=80
WEB_PORT_SSL=443
# XDEBUG_CONFIG possible values: main|osx. Use main value for Linux and Windows, osx value for MacOS.
XDEBUG_CONFIG=main
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
INNODB_USE_NATIVE_AIO=1
###< docker configuration ###

APP_NAME=Laravel
APP_ENV=test
APP_KEY=base64:KgeWah2LwOk5HLjCYuIZjaQQwX59ASqUjCKZMD6H4Ew=
Expand Down
10 changes: 10 additions & 0 deletions .env.test-ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# by default test environment using .env.test. So all tests will use the same database. If you need to separate it, just use make env-test-ci command and then run migrations and seed.

###> docker configuration ###
WEB_PORT_HTTP=80
WEB_PORT_SSL=443
# XDEBUG_CONFIG possible values: main|osx. Use main value for Linux and Windows, osx value for MacOS.
XDEBUG_CONFIG=main
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
INNODB_USE_NATIVE_AIO=1
###< docker configuration ###

APP_NAME=Laravel
APP_ENV=test
APP_KEY=base64:KgeWah2LwOk5HLjCYuIZjaQQwX59ASqUjCKZMD6H4Ew=
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ARG HOST_GID=1000
ENV USERNAME=www-data
ARG INSIDE_DOCKER_CONTAINER=1
ENV INSIDE_DOCKER_CONTAINER=$INSIDE_DOCKER_CONTAINER
ARG XDEBUG_CONFIG=main
ENV XDEBUG_CONFIG=$XDEBUG_CONFIG

# check environment
RUN if [ "$BUILD_ARGUMENT_ENV" = "default" ]; then echo "Set BUILD_ARGUMENT_ENV in docker build-args like --build-arg BUILD_ARGUMENT_ENV=dev" && exit 2; \
Expand Down Expand Up @@ -68,9 +70,9 @@ COPY ./docker/$BUILD_ARGUMENT_ENV/php.ini /usr/local/etc/php/php.ini
RUN a2enmod rewrite
RUN a2enmod ssl

# install Xdebug in case development or test environment
# install Xdebug in case dev/test environment
COPY ./docker/general/do_we_need_xdebug.sh /tmp/
COPY ./docker/dev/xdebug.ini /tmp/
COPY ./docker/dev/xdebug-${XDEBUG_CONFIG}.ini /tmp/xdebug.ini
RUN chmod u+x /tmp/do_we_need_xdebug.sh && /tmp/do_we_need_xdebug.sh

# install composer
Expand Down
Loading

0 comments on commit d01007a

Please sign in to comment.