An open API service indexing awesome lists of open source software.

https://github.com/scraly/elephpants-front

UI/Front in PHP, served by FrankenPHP, to display elePHpants cute drawing from elephpants-api in Go.
https://github.com/scraly/elephpants-front

docker elephpants frankenphp php

Last synced: 9 days ago
JSON representation

UI/Front in PHP, served by FrankenPHP, to display elePHpants cute drawing from elephpants-api in Go.

Awesome Lists containing this project

README

          

# elephpants-front: PHP application with FrankenPHP application server

This tiny app allows users to display our cute ElePHPants (served by [scraly/elephpants-api](https://github.com/scraly/elephpants-api) API).

# Build and run locally

```bash
docker build -t scraly/elephpants-front:0.0.3 . --push
docker run -it --rm --name elephpants-front2 -e SERVER_NAME=":80" -p 80:80 scraly/elephpants-front:0.0.4
```

Test:
```bash
curl https://localhost/app.php
```

# Deploy to Kubernetes

```bash
#server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server
kubectl run elephpants-front --image=scraly/elephpants-front:0.0.4 --env="SERVER_NAME=:80" --port=80

kubectl expose pod elephpants-front --type=LoadBalancer --port=80 --target-port=80 -n demo
```

# FrankenPHP

```bash
docker run -v $PWD:/app -p 80:80 -p 443:443 dunglas/frankenphp
```

Test:
```bash
curl https://localhost/app.php
```