Add PHP Media API scaffold and Docker configs
Initial project scaffold for a PHP Media API including routing, controllers, models and services under api/ (Router, Media/Cast/Image/Settings controllers, models, database/bootstrap files and automatic docs service). Adds Docker support (Dockerfile, docker-compose.yml, DOCKER_README.md, php-custom.ini), .htaccess for pretty URLs, API documentation and example payloads (API_EXAMPLES.md, api/README.md, api_examples/*.json), image handling service and logging, plus a comprehensive .gitignore. This commit provides a runnable development environment and example requests to get the API up and tested quickly.
This commit is contained in:
58
docker-compose.yml
Normal file
58
docker-compose.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: kyoo-php
|
||||
ports:
|
||||
- "6400:80"
|
||||
volumes:
|
||||
- ./api:/var/www/html
|
||||
depends_on:
|
||||
- mariadb
|
||||
networks:
|
||||
- kyoo-network
|
||||
environment:
|
||||
- DB_HOST=mariadb
|
||||
- DB_NAME=kyoo
|
||||
- DB_USER=kyoo_user
|
||||
- DB_PASS=kyoo_password
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10.11
|
||||
container_name: kyoo-mariadb
|
||||
ports:
|
||||
- "6401:3306"
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=root_password
|
||||
- MYSQL_DATABASE=kyoo
|
||||
- MYSQL_USER=kyoo_user
|
||||
- MYSQL_PASSWORD=kyoo_password
|
||||
volumes:
|
||||
- mariadb-data:/var/lib/mysql
|
||||
networks:
|
||||
- kyoo-network
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
container_name: kyoo-phpmyadmin
|
||||
ports:
|
||||
- "6402:80"
|
||||
environment:
|
||||
- PMA_HOST=mariadb
|
||||
- PMA_PORT=3306
|
||||
- PMA_USER=kyoo_user
|
||||
- PMA_PASSWORD=kyoo_password
|
||||
depends_on:
|
||||
- mariadb
|
||||
networks:
|
||||
- kyoo-network
|
||||
|
||||
networks:
|
||||
kyoo-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
mariadb-data:
|
||||
Reference in New Issue
Block a user