-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff0e42c
commit d44fdf4
Showing
2 changed files
with
10 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,13 @@ | ||
DOKAR PHP | ||
--- | ||
|
||
There is 3 variant in this images. | ||
PHP 8.3 of dokar-php | ||
|
||
There is 4 variant in this images. | ||
|
||
| Variant | Description | Usage | | ||
| --- | --- | --- | | ||
| Only CLI | Provide only php-cli. This image can be useful to run such as `laravel-horizon, laravel-websocket, tinker`. | `docker pull ghcr.io/digital-entropy/dokar-php/cli:8.0` | | ||
| Only PHP-FPM | Provide php-fpm from php-cli variant. This image listen on `fastcgi 0.0.0.0:9008`. | `docker pull ghcr.io/digital-entropy/dokar-php/fpm:8.0` | | ||
| With Nginx | Production ready php image that use nginx as web server. This image will serve `/var/www/public` directory. | `docker pull ghcr.io/digital-entropy/dokar-php/nginx:8.0` | | ||
|
||
|
||
### Example | ||
|
||
#### 1. PHP-NGINX Example | ||
Below is example usage of php-nginx image for docker-compose in our laravel project | ||
```yaml | ||
version: "3.8" | ||
services: | ||
web: | ||
image: ghcr.io/digital-entropy/dokar-php/nginx:8.0 | ||
restart: unless-stopped | ||
ports: | ||
- "${APP_DOCK_PORT}:80" | ||
links: | ||
- db | ||
- redis | ||
volumes: | ||
# laravel comes up with public dir inside workdir, so we will mount only /var/www | ||
- .:/var/www | ||
db: | ||
image: timescale/timescaledb:2.1.0-pg13 | ||
volumes: | ||
- db_data:/var/lib/postgresql/data | ||
restart: unless-stopped | ||
environment: | ||
POSTGRES_DB: ${DB_DATABASE} | ||
POSTGRES_USER: ${DB_USERNAME} | ||
POSTGRES_PASSWORD: ${DB_PASSWORD} | ||
redis: | ||
image: redis | ||
restart: unless-stopped | ||
volumes: | ||
db_data: {} | ||
``` | ||
for run artisan command you can write something like. | ||
```shell | ||
docker-compose run --user=dokar web php artisan list | ||
``` | ||
| Only CLI | Provide only php-cli. This image can be useful to run such as `laravel-horizon, laravel-websocket, tinker`. | `docker pull ghcr.io/digital-entropy/dokar-php/cli:8.3` | | ||
| Only PHP-FPM | Provide php-fpm from php-cli variant. This image listen on `fastcgi 0.0.0.0:9008`. | `docker pull ghcr.io/digital-entropy/dokar-php/fpm:8.3` | | ||
| With Nginx | Production ready php image that use nginx as web server. This image will serve `/var/www/public` directory. | `docker pull ghcr.io/digital-entropy/dokar-php/nginx:8.3` | | ||
Octane | Crafted for running octane with `swoole` driver. use `DOCKER_WORKERS=` env to define specific worker you need.| `docker pull ghcr.io/digital-entropy/dokar-php/octane:8.3` |