Skip to content

Commit 3087e26

Browse files
Add Mock Server
1 parent 2069238 commit 3087e26

File tree

12 files changed

+2174
-26
lines changed

12 files changed

+2174
-26
lines changed

composer.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mock-server/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.idea/
2+
.dart_tool
3+
/vendor/
4+
/tests/sdks
5+
/.vscode
6+
.vs
7+
.phpunit.*
8+
.env
9+
.envrc
10+
.hatch
11+
12+
# exclude everything
13+
examples/*
14+
tests/tmp
15+
.phpunit.result.cache
16+
17+
# exception to the rule
18+
!examples/.gitkeep
19+
20+
**/.DS_Store
21+
templates/swift/example/.build
22+
templates/swift/example/Example.xcodeproj/project.xcworkspace/xcuserdata
23+
templates/swift/example/Example.xcodeproj/xcuserdata
24+
**/xcuserdata
25+
# exclude go checksum files
26+
go.sum
27+

mock-server/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM composer:2.0 as composer
2+
3+
LABEL maintainer="[email protected]"
4+
5+
ARG TESTING=false
6+
ENV TESTING=$TESTING
7+
8+
WORKDIR /usr/local/src/
9+
10+
COPY composer.lock /usr/local/src/
11+
COPY composer.json /usr/local/src/
12+
13+
RUN composer install --ignore-platform-reqs --optimize-autoloader \
14+
--no-plugins --no-scripts --prefer-dist \
15+
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
16+
17+
FROM phpswoole/swoole:4.8.7-php8.1-alpine as final
18+
19+
ENV _APP_REDIS_HOST=redis \
20+
_APP_REDIS_PORT=6379
21+
22+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
23+
24+
WORKDIR /usr/src/code
25+
26+
COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor
27+
28+
# Add Source Code
29+
COPY ./src /usr/src/code/src
30+
COPY ./app /usr/src/code/app
31+
32+
EXPOSE 80
33+
34+
CMD ["php", "app/http.php"]

0 commit comments

Comments
 (0)