-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
188 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
FROM unit:php8.2 | ||
# https://github.com/tippexs/nginxspace/blob/master/dev/Dockerfile | ||
|
||
LABEL org.opencontainers.image.authors="Dmitry Verkhoturov <paskal.07@gmail.com>" \ | ||
org.opencontainers.image.description="Nginx Unit with PHP 8.2 with everything needed for Bitrix" \ | ||
org.opencontainers.image.documentation="https://github.com/paskal/bitrix.infra" \ | ||
org.opencontainers.image.source="https://github.com/paskal/bitrix.infra.git" \ | ||
org.opencontainers.image.title="php" | ||
|
||
#RUN apt-get update \ | ||
# && -y apt-transport-https lsb-release ca-certificates wget \ | ||
# && wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ | ||
# && sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \ | ||
# && apt-get update \ | ||
# && apt-get -y --no-install-recommends install \ | ||
# php8.2-gd \ | ||
# php8.2-imagick \ | ||
# php8.2-interbase \ | ||
# php8.2-intl \ | ||
# php8.2-mbstring \ | ||
# php8.2-mcrypt \ | ||
# php8.2-memcache \ | ||
# php8.2-memcached \ | ||
# php8.2-mysql \ | ||
# php8.2-opcache \ | ||
# php8.2-redis \ | ||
# php8.2-soap \ | ||
# php8.2-xdebug \ | ||
# php8.2-zip \ | ||
# webp \ | ||
# msmtp \ | ||
# msmtp-mta \ | ||
# sudo \ | ||
# cron \ | ||
# && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | ||
|
||
# msmtp to allow email sending | ||
# msmtp-mta to allow sendmail usage with msmtp | ||
# sudo to allow create logfile with www-data user | ||
# cron to run cronjobs in a separate container | ||
|
||
# without this, php in the container won't work properly | ||
COPY ./90-php.ini /etc/php/php.ini | ||
|
||
RUN usermod -u 1000 www-data | ||
RUN groupmod -g 1000 www-data | ||
|
||
COPY nginx-unit.json /docker-entrypoint.d/.unit.conf.json | ||
|
||
EXPOSE 8090 8091 8092 8093 | ||
|
||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] | ||
|
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,102 @@ | ||
{ | ||
"listeners": { | ||
"0.0.0.0:8090": { | ||
"application": "bitrix_urlrewrite_prod" | ||
}, | ||
"0.0.0.0:8091": { | ||
"application": "bitrix_direct_prod" | ||
}, | ||
"0.0.0.0:8092": { | ||
"application": "bitrix_urlrewrite_dev" | ||
}, | ||
"0.0.0.0:8093": { | ||
"application": "bitrix_direct_dev" | ||
} | ||
}, | ||
"applications": { | ||
"bitrix_urlrewrite_prod": { | ||
"type": "php", | ||
"processes": { | ||
"max": 20, | ||
"spare": 5 | ||
}, | ||
"root": "/web/prod/", | ||
"script": "bitrix/urlrewrite.php", | ||
"user": "www-data", | ||
"group": "www-data", | ||
"options": { | ||
"file": "/etc/php.ini", | ||
"admin": { | ||
"memory_limit": "1536M", | ||
"variables_order": "EGPCS", | ||
"expose_php": "0" | ||
}, | ||
"user": { | ||
"display_errors": "0" | ||
} | ||
} | ||
}, | ||
"bitrix_direct_prod": { | ||
"type": "php", | ||
"processes": 20, | ||
"root": "/web/prod/", | ||
"index": "index.php", | ||
"user": "www-data", | ||
"group": "www-data", | ||
"options": { | ||
"file": "/etc/php.ini", | ||
"admin": { | ||
"memory_limit": "1536M", | ||
"variables_order": "EGPCS", | ||
"expose_php": "0" | ||
}, | ||
"user": { | ||
"display_errors": "0" | ||
} | ||
} | ||
}, | ||
"bitrix_urlrewrite_dev": { | ||
"type": "php", | ||
"processes": { | ||
"max": 20, | ||
"spare": 5 | ||
}, | ||
"root": "/web/dev/", | ||
"script": "bitrix/urlrewrite.php", | ||
"user": "www-data", | ||
"group": "www-data", | ||
"options": { | ||
"file": "/etc/php.ini", | ||
"admin": { | ||
"memory_limit": "1536M", | ||
"variables_order": "EGPCS", | ||
"expose_php": "0" | ||
}, | ||
"user": { | ||
"display_errors": "1" | ||
} | ||
} | ||
}, | ||
"bitrix_direct_dev": { | ||
"type": "php", | ||
"processes": 20, | ||
"root": "/web/dev/", | ||
"index": "index.php", | ||
"user": "www-data", | ||
"group": "www-data", | ||
"options": { | ||
"file": "/etc/php.ini", | ||
"admin": { | ||
"memory_limit": "1536M", | ||
"variables_order": "EGPCS", | ||
"expose_php": "0" | ||
}, | ||
"user": { | ||
"display_errors": "1" | ||
} | ||
} | ||
} | ||
}, | ||
"access_log": "/var/log/php/unit-access.log" | ||
} | ||
|
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