https://github.com/avil13/php-master
Simple docker-compose config to work with php.
https://github.com/avil13/php-master
docker docker-compose docker-image php php8 php80 server
Last synced: 9 months ago
JSON representation
Simple docker-compose config to work with php.
- Host: GitHub
- URL: https://github.com/avil13/php-master
- Owner: avil13
- License: mit
- Created: 2021-09-11T14:52:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-14T20:23:19.000Z (over 2 years ago)
- Last Synced: 2024-10-11T17:18:13.549Z (about 1 year ago)
- Topics: docker, docker-compose, docker-image, php, php8, php80, server
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-master
Simple docker-compose config to work with php.
---
An easy-to-use repository if you want to quickly try something in php.
Used by:
- php: 8.1
- mariadb: 10.5
- nginx
- phpmyadmin
You should already have docker and docker-compose.
## Project structure
- `etc` - folder with configs, including nginx
- `www` - folder with sites.
- `add_site.sh` - a script for quickly adding a new site folder to it, nginx config and generating an ssl certificate.
## Start
Anything you might need can be done with the `make` command.
### If you want to work with your hands
At the root of the project
```bash
# up the local container
docker-compose up -d
```
The default address is `http://0.0.0.0/`
You can add a domain in `/etc/hosts` (or analogs depending on the OS)
```
# Host addresses
0.0.0.0 test.loc
```
test.loc - used for example and test work
## Adding a site
```bash
# bash
make add
```
The script `add_site.sh` is used to add a new site.
After starting, it will create a folder with the domain name in `www` and a config to connect it to nginx and ssl certificate.
After creating the site, it is recommended to restart docker-compose to apply the config in nginx.
> By default, all generated files are in `.gitignore`. You will have to fix it yourself.