-
Notifications
You must be signed in to change notification settings - Fork 34
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
6 changed files
with
629 additions
and
2 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,48 @@ | ||
FROM composer:2.0 AS step0 | ||
|
||
ARG TESTING=true | ||
ARG DEBUG=false | ||
|
||
ENV TESTING=$TESTING | ||
ENV DEBUG=$DEBUG | ||
|
||
WORKDIR /usr/local/src/ | ||
|
||
COPY composer.* /usr/local/src/ | ||
|
||
RUN composer install --ignore-platform-reqs --optimize-autoloader \ | ||
--no-plugins --no-scripts --prefer-dist \ | ||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi` | ||
|
||
FROM appwrite/base:0.9.0 as final | ||
|
||
ARG TESTING=true | ||
ARG DEBUG=false | ||
|
||
ENV TESTING=$TESTING | ||
ENV DEBUG=$DEBUG | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
RUN \ | ||
if [ "$DEBUG" == "true" ]; then \ | ||
apk add boost boost-dev; \ | ||
fi | ||
|
||
WORKDIR /usr/src/code | ||
|
||
COPY ./dev /usr/src/code/dev | ||
COPY ./src /usr/src/code/src | ||
COPY ./tests /usr/src/code/tests | ||
COPY ./phpunit.xml /usr/src/code/phpunit.xml | ||
COPY ./phpbench.json /usr/src/code/phpbench.json | ||
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor | ||
|
||
# Enable Extensions | ||
RUN if [ "$DEBUG" == "true" ]; then cp /usr/src/code/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini; fi | ||
RUN if [ "$DEBUG" = "false" ]; then rm -rf /usr/src/code/dev; fi | ||
RUN if [ "$DEBUG" = "false" ]; then rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so; fi | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["php", "tests/e2e/server-swoole-coroutine.php"] |
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
Oops, something went wrong.