Both REST API for http connections and PHP librairy. Manage Interactions between client/server-side applications and database
Documentation about the rest api can found here or in the openapi specifications file
- Make sure to have
docker
anddocker-compose
install on your server - To run the server in a docker container, just create a
docker-compose.yml
with the content bellowversion: "3" services: php: image: registry.gitlab.com/cafet-app/cafet-app/server:latest container_name: cafet-server environment: SERVER_DOMAIN: localhost MAILHUB: localhost ports: - "80:80" links: - db depends_on: - db volumes: - php-logs:/var/log networks: - cafet_net db: image: registry.gitlab.com/cafet-app/cafet-app/database:latest container_name: cafet-server-mysql restart: always ports: - '3306:3306' networks: - cafet_net volumes: php-logs: networks: cafet_net:
- Then start
docker-compose
echo DGNvKHoDSYNLxxbZe2cr | docker login -u docker-token --password-stdin registry.gitlab.com docker-compose up -d
- Apache
- Tested with Apache 2.4.33
- Extension mod_rewrite enabled
- PHP 7.2 or upper with PDO, tested with:
- Tested versions:
- PHP 7.2.4
- PHP 7.2.9
- Extensions:
- PDO
- PDO_mysql
- Tested versions:
- MySQL 5.7 or upper
- tested with MySQL 5.7.21
- Dowload the latest version and unpack the
app
folder where you want. - Create a virtual host pointing to this folder. e.g.
cofee.example.com
- Create a database.
- Run SQL import scripts that you can find here on your mysql server.
- Open and edit
path/to/app/cafetapi_content/config.php
. - Access
http://cofee.example.com
and your installation is now up and ready
Clone the git repository
git clone [email protected]:cafet-app/php-api-server.git
cd php-api-server
Run development environment
docker-compose up --build
Without any other docker port binding:
- The app is accessible from
{docker_host}:80/
- phpMyAdmin is accessible from
{docker_host}:81/
Demo user is Nowtryz <[email protected]>
with password admin
. Easy to keep in mind 😉, let's enjoy!
- Work with composer
- Create docker images
- Implementation of gettext