Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vsaint1/php-anywhere-docker
Run php dockerized on any OS, dev or production environment.
https://github.com/vsaint1/php-anywhere-docker
Last synced: 18 days ago
JSON representation
Run php dockerized on any OS, dev or production environment.
- Host: GitHub
- URL: https://github.com/vsaint1/php-anywhere-docker
- Owner: vsaint1
- Created: 2024-04-28T23:32:32.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-04-29T01:40:47.000Z (8 months ago)
- Last Synced: 2024-04-30T00:31:12.141Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 147 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# php-anywhere
This project aims to help you `build/develop` [PHP](https://www.php.net) applications in Docker containers without having to install anything locally.
**Works with any PHP application type/framework**
## Demo
Live `reload`, almost no configuration delopy and easy to use.
# Requirements
- Any operating system with [Docker](https://www.docker.com)
# Project Specifications **[DOC]**
- Nginx config file with fast_cgi default configuration, you can change it in `docker/nginx/php.conf` file
- PHP config file with some configs, you can change it in `docker/php/php.ini` file
- Current default project services running are `nginx`, `php`, `redis` and `sqlserver`
1. app service:
- `php-fpm`
- `composer`
- `php-extensions`
2. nginx service:
- `nginx`
- `fast_cgi`
3. db service:- `mssql`
4. redis service:
- `redis`
# How to use **[CONFIGURATION]**
```nginx
# current
fastcgi_pass app:9000;# docker/nginx/php.conf
fastcgi_pass container_name:fpm_port; # MUST FOLLOW THIS PATTERN```
```yml
#docker-compose.yml
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
working_dir: /var/www/
networks:
- php_anywhere_network
volumes:
- ./:/var/www
depends_on:
- redis
- db
```# Running **[COMMANDS]**
> Starting services dettached
```bashdocker-compose up -d
```
> Entering into container
```bash
docker exec -it container_name bash
```
> Stopping services
```bash
docker-compose stop
```
> **[NOTES]**: This is "base" project, you can configure and change everything.