-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from artem328/4.2
4.2
- Loading branch information
Showing
16 changed files
with
197 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
.idea | ||
.idea/ | ||
|
||
# Make .env untracked and follow old rules of .env files: | ||
# - .env.dist file contains example values | ||
# - .env file is used for project and for docker-compose as well | ||
# The reason of it is docker look into .env file for variables used in config | ||
# and will not check .env.local, .env.${ENV} etc. | ||
# Also we cannot configure docker-compose to get variables from files different from .env | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,46 @@ | ||
FROM 4xxi/php-pgsql:flex | ||
FROM php:7.3-fpm-alpine | ||
|
||
# To add additional packages and php extensions uncomment the following lines and add required dependencies | ||
# Check https://hub.docker.com/_/php/ for examples and documentation | ||
RUN apk add --no-cache \ | ||
git \ | ||
icu-dev \ | ||
libzip-dev \ | ||
postgresql-dev \ | ||
zip | ||
|
||
#RUN apt-get update && apt-get install -y \ | ||
# lib_name_1 \ | ||
# lib_name_2 \ | ||
# && docker-php-ext-install \ | ||
# ext_name_1 \ | ||
# ext_name_2 | ||
RUN docker-php-ext-install \ | ||
intl \ | ||
opcache \ | ||
pdo \ | ||
pdo_pgsql \ | ||
zip | ||
|
||
# Uncomment code below for enabling xDebug | ||
# or delete it with the xdebug.ini file | ||
|
||
#RUN apk add --no-cache --virtual .xdebug-build-deps ${PHPIZE_DEPS} \ | ||
# && pecl install xdebug \ | ||
# && docker-php-ext-enable xdebug \ | ||
# && apk del .xdebug-build-deps | ||
# | ||
#COPY xdebug.ini /usr/local/etc/php/xdebug.ini | ||
# | ||
#RUN cat /usr/local/etc/php/xdebug.ini >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
ENV COMPOSER_MEMORY_LIMIT -1 | ||
RUN composer global require hirak/prestissimo --no-plugins --no-scripts | ||
|
||
ARG HOST_UID | ||
|
||
RUN if [ ! -z "${HOST_UID}" ]; then \ | ||
deluser www-data \ | ||
&& addgroup www-data \ | ||
&& adduser -u "${HOST_UID}" -G www-data -H -s /bin/sh -D www-data; \ | ||
fi | ||
|
||
ENV WWW_DATA_UID ${HOST_UID} | ||
|
||
COPY ./symfony.ini /usr/local/etc/php/conf.d/ | ||
COPY ./symfony.pool.conf /usr/local/etc/php-fpm.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
COMMAND="composer install --prefer-dist --no-progress --no-suggest --no-interaction" | ||
|
||
if [[ "prod" = "${APP_ENV}" ]]; then | ||
COMMAND="${COMMAND} --no-dev --optimize-autoloader --classmap-authoritative" | ||
fi | ||
|
||
if [[ ! -z "${WWW_DATA_UID}" ]]; then | ||
su \ | ||
-c "${COMMAND}" \ | ||
-s /bin/sh \ | ||
-m \ | ||
www-data | ||
else | ||
${COMMAND} | ||
chown -R www-data var/ | ||
fi | ||
|
||
php-fpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
date.timezone = UTC | ||
memory_limit = -1 | ||
max_execution_time=3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
; Unix user/group of processes | ||
; Note: The user is mandatory. If the group is not set, the default user's group | ||
; will be used. | ||
user = www-data | ||
group = www-data | ||
|
||
; The address on which to accept FastCGI requests. | ||
; Valid syntaxes are: | ||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on | ||
; a specific port; | ||
; 'port' - to listen on a TCP socket to all addresses on a | ||
; specific port; | ||
; '/path/to/unix/socket' - to listen on a unix socket. | ||
; Note: This value is mandatory. | ||
listen = 0.0.0.0:9000 | ||
|
||
; Choose how the process manager will control the number of child processes. | ||
; Possible Values: | ||
; static - a fixed number (pm.max_children) of child processes; | ||
; dynamic - the number of child processes are set dynamically based on the | ||
; following directives. With this process management, there will be | ||
; always at least 1 children. | ||
; pm.max_children - the maximum number of children that can | ||
; be alive at the same time. | ||
; pm.start_servers - the number of children created on startup. | ||
; pm.min_spare_servers - the minimum number of children in 'idle' | ||
; state (waiting to process). If the number | ||
; of 'idle' processes is less than this | ||
; number then some children will be created. | ||
; pm.max_spare_servers - the maximum number of children in 'idle' | ||
; state (waiting to process). If the number | ||
; of 'idle' processes is greater than this | ||
; number then some children will be killed. | ||
; ondemand - no children are created at startup. Children will be forked when | ||
; new requests will connect. The following parameter are used: | ||
; pm.max_children - the maximum number of children that | ||
; can be alive at the same time. | ||
; pm.process_idle_timeout - The number of seconds after which | ||
; an idle process will be killed. | ||
; Note: This value is mandatory. | ||
pm = dynamic | ||
|
||
; The number of child processes to be created when pm is set to 'static' and the | ||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. | ||
; This value sets the limit on the number of simultaneous requests that will be | ||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. | ||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP | ||
; CGI. The below defaults are based on a server without much resources. Don't | ||
; forget to tweak pm.* to fit your needs. | ||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' | ||
; Note: This value is mandatory. | ||
pm.max_children = 20 | ||
|
||
; The number of child processes created on startup. | ||
; Note: Used only when pm is set to 'dynamic' | ||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 | ||
pm.start_servers = 2 | ||
|
||
; The desired minimum number of idle server processes. | ||
; Note: Used only when pm is set to 'dynamic' | ||
; Note: Mandatory when pm is set to 'dynamic' | ||
pm.min_spare_servers = 1 | ||
|
||
; The desired maximum number of idle server processes. | ||
; Note: Used only when pm is set to 'dynamic' | ||
; Note: Mandatory when pm is set to 'dynamic' | ||
pm.max_spare_servers = 3 | ||
|
||
catch_workers_output = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
xdebug.remote_enable=on | ||
xdebug.remote_autostart=on | ||
xdebug.remote_connect_back=1 | ||
xdebug.remote_port=9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ syncs: | |
sync_excludes: | ||
- '.git' | ||
- '.idea' | ||
- 'var/cache/*' | ||
- 'var/cache/*' |