Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Docker and docker-compose for easy development and testing #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG OPCACHE_DASHBOARD_PHP_VERSION=7.2

FROM php:$OPCACHE_DASHBOARD_PHP_VERSION-apache

COPY opcache.php /var/www/html/opcache.php

RUN docker-php-ext-install opcache
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ Or just copy and paste ```opcache.php``` anywhere in your public folder. You can

**Try to keep it safe for non authorized users.**

Development
===========

Run `docker-compose up` in project root directory. OPcache dashboard is available at http://localhost:8000/opcache.php

Start coding :)

The docker container configuration can be altered at build time using the following environment variables :

- `OPCACHE_DASHBOARD_PHP_VERSION` : PHP version to be installed in the container. Supported versions are listed on [PHP's Docker image page](https://store.docker.com/images/php) (`*-apache` images are supported)

Screenshots
===========
![Main page](https://raw.github.com/carlosbuenosvinos/opcache-dashboard/master/thumbnail-1.png)
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3'

services:
web:
build:
context: .
args:
OPCACHE_DASHBOARD_PHP_VERSION: ${OPCACHE_DASHBOARD_PHP_VERSION-7.2}
image: opcache:php-${OPCACHE_DASHBOARD_PHP_VERSION-7.2}
volumes:
- ./opcache.php:/var/www/html/opcache.php
ports:
- ${OPCACHE_DASHBOARD_PORT-8000}:80