-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
30992c6
commit f2c85d1
Showing
3 changed files
with
40 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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
FROM lojassimonetti/php-apache-oci8-composer:php8dot3 | ||
|
||
COPY ./bin /usr/bin/ | ||
|
||
USER root | ||
|
||
RUN echo "---> Swoole" && \ | ||
pecl install swoole && \ | ||
docker-php-ext-configure swoole --enable-http2 && \ | ||
docker-php-ext-enable swoole | ||
|
||
USER www-data:www-data | ||
|
||
CMD ["/tini", "--", "/usr/bin/swoole-run"] |
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,28 @@ | ||
#!/bin/bash | ||
|
||
rm -f $CONTAINER_STARTED_LOCK | ||
|
||
if [[ ${XDEBUG_ENABLED} == true ]]; then | ||
sudo -E xdebug-set-mode ${XDEBUG_MODE:-debug} | ||
fi | ||
|
||
sudo -E newrelic-setup | ||
sudo -E opcache-setup | ||
|
||
if [[ ${SESSION_HANDLER} == true ]]; then | ||
sudo rm -f /usr/local/etc/php/conf.d/session-handler.ini | ||
echo "session.save_handler = ${SESSION_HANDLER_NAME}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini | ||
echo "session.save_path = \"${SESSION_HANDLER_PATH}\"" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini | ||
fi | ||
|
||
sudo rm -rf var/cache/* var/logs/* && | ||
sudo mkdir -p /var/www/html/var/cache && | ||
sudo mkdir -p /var/www/html/var/logs && | ||
sudo mkdir -p /var/www/html/var/sessions && | ||
sudo chown -R www-data:www-data /var/www/html/var/cache && chmod 777 /var/www/html/var/cache && | ||
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs && | ||
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions | ||
|
||
post-startup-hook | ||
|
||
touch $CONTAINER_STARTED_LOCK |
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,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
pre-run | ||
|
||
exec /usr/local/bin/php /var/www/html/server.php |