docs: update docs for first-time contributor (#1368)

This commit is contained in:
Indra Gunawan
2025-02-17 17:31:33 +08:00
committed by GitHub
parent 9dd05b0b1b
commit 233753ca6b
3 changed files with 11 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ docker build -t frankenphp-dev -f dev.Dockerfile .
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 8080:8080 -p 443:443 -p 443:443/udp -v $PWD:/go/src/app -it frankenphp-dev
```
The image contains the usual development tools (Go, GDB, Valgrind, Neovim...).
The image contains the usual development tools (Go, GDB, Valgrind, Neovim...).
If docker version is lower than 23.0, build is failed by dockerignore [pattern issue](https://github.com/moby/moby/pull/42676). Add directories to `.dockerignore`.
@@ -49,10 +49,13 @@ cd testdata/
../caddy/frankenphp/frankenphp run
```
The server is listening on `127.0.0.1:8080`:
The server is listening on `127.0.0.1:80`:
> [!NOTE]
> if you are using Docker, you will have to either bind container port 80 or execute from inside the container
```console
curl -vk https://localhost/phpinfo.php
curl -vk http://127.0.0.1/phpinfo.php
```
## Minimal test server

View File

@@ -46,7 +46,7 @@ RUN apt-get update && \
echo 'set auto-load safe-path /' > /root/.gdbinit && \
echo '* soft core unlimited' >> /etc/security/limits.conf \
&& \
apt-get clean
apt-get clean
WORKDIR /usr/local/src/php
RUN git clone --branch=PHP-8.4 https://github.com/php/php-src.git . && \
@@ -71,7 +71,9 @@ WORKDIR /usr/local/src/watcher
RUN git clone https://github.com/e-dant/watcher . && \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \
cmake --build build/ && \
cmake --install build
cmake --install build && \
cp build/libwatcher-c.so /usr/local/lib/libwatcher-c.so && \
ldconfig
WORKDIR /go/src/app
COPY . .

View File

@@ -21,7 +21,7 @@ func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
req, err := frankenphp.NewRequestWithContext(r)
if err == nil {
if err != nil {
panic(err)
}