-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
42c0b3d
commit ea1bd6c
Showing
11 changed files
with
1,421 additions
and
1 deletion.
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 @@ | ||
vendor |
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,18 @@ | ||
FROM php:8-cli | ||
|
||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ | ||
RUN apt-get update && apt-get install -y wget git unzip && apt-get clean | ||
RUN install-php-extensions curl zip | ||
EXPOSE 3000 | ||
RUN mkdir -p /app | ||
WORKDIR /app | ||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | ||
COPY composer.json /app/composer.json | ||
COPY composer.lock /app/composer.lock | ||
RUN composer install --no-dev -o -n | ||
|
||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | ||
ENTRYPOINT ["php"] | ||
CMD ["-S", "0.0.0.0:3000", "-t", "/app/src"] | ||
ENV PHP_CLI_SERVER_WORKERS=50 | ||
COPY src/ src/ |
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,32 @@ | ||
FROM mcr.microsoft.com/windows/servercore/iis:windowsservercore-1909 | ||
|
||
RUN powershell -Command \ | ||
$ErrorActionPreference = 'Stop'; \ | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ | ||
Invoke-WebRequest -Method Get -Uri https://windows.php.net/downloads/releases/php-8.0.2-nts-Win32-vs16-x64.zip -OutFile c:\php.zip ; \ | ||
Expand-Archive -Path c:\php.zip -DestinationPath c:\php ; \ | ||
Remove-Item c:\php.zip -Force | ||
|
||
ADD https://aka.ms/vs/16/release/VC_redist.x64.exe vc-redist.exe | ||
RUN start /w vc-redist.exe /q /norestart & del vc-redist.exe | ||
|
||
RUN powershell.exe -executionpolicy bypass "Add-WindowsFeature Web-CGI" | ||
|
||
ADD https://curl.haxx.se/ca/cacert.pem ca.pem | ||
RUN powershell -command cp ca.pem "C:\php\\" && powershell -command cp c:\php\php.ini-production c:\php\php.ini | ||
RUN powershell -command echo 'extension=php_mbstring.dll' 'extension=php_curl.dll' 'extension=php_openssl.dll' '[PHP_FILEINFO]' 'extension=php_fileinfo.dll' ' ' ' ' 'curl.cainfo = c:\php\ca.pem' >> C:\php\php.ini | ||
|
||
RUN %windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='c:\php\php-cgi.exe'] | ||
RUN %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='c:\PHP\php-cgi.exe',resourceType='Either'] | ||
RUN %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /[fullPath='c:\PHP\php-cgi.exe'].instanceMaxRequests:10000 | ||
RUN %windir%\system32\inetsrv\appcmd.exe set config /section:defaultDocument /enabled:true /+files.[value='index.php'] | ||
RUN setx PATH /M %PATH%;C:\PHP | ||
|
||
RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\* | ||
WORKDIR /inetpub | ||
ADD https://getcomposer.org/composer-stable.phar composer.phar | ||
COPY composer.json composer.json | ||
COPY composer.lock composer.lock | ||
RUN php composer.phar install --no-dev -o -n --prefer-dist | ||
WORKDIR /inetpub/wwwroot | ||
COPY src . |
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,27 @@ | ||
{ | ||
"name": "dapr/actorphp", | ||
"description": "A simple e2e test actor", | ||
"type": "project", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Rob Landers", | ||
"email": "landers.robert@gmail.com" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"require": { | ||
"dapr/php-sdk": "1.*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Test\\": "src" | ||
} | ||
}, | ||
"scripts": { | ||
"start-env": [ | ||
"docker build -t php-sdk-test .", | ||
"docker run --rm --name=phpsdktest -v $(pwd):/app -p 3000:3000 php-sdk-test" | ||
] | ||
} | ||
} |
Oops, something went wrong.