Skip to content

Instantly share code, notes, and snippets.

View mohamednizar's full-sized avatar

Mohamed Nizar mohamednizar

View GitHub Profile
@mohamednizar
mohamednizar / scripted_external.js
Created November 13, 2019 06:01
Grafana Scripted dashboard , Render dashboard with logged user information
'use strict';
// accessible variables in this scope
var window, document, ARGS, $, jQuery, moment, kbn;
// Setup some variables
var dashboard;
// All url parameters are available via the ARGS object
var ARGS;
[global]
; Override default pid file
pid = /run/php-fpm.pid
; Avoid logs being sent to syslog
error_log = /proc/self/fd/2
[www]
; Access from webserver container is via network, not socket file
listen = [::]:9000
@mohamednizar
mohamednizar / Dockerfile
Created November 8, 2018 10:33
Deploy nginx app with docker
# Dockerfile for a php:7.2-apache container
# Place this file inside the project folder
FROM phpearth/php:7.2-nginx
RUN apk add --no-cache php7.2-sodium php7.2-intl php7.2-pdo_mysql \
&& apk add --no-cache php7-mysqli mysql
RUN apk add --no-cache phpunit
RUN apk add --no-cache composer
@mohamednizar
mohamednizar / Dockerfile
Created October 26, 2018 11:29 — forked from tdutrion/Dockerfile
Dockerfile PHP7-FPM with extensions (Redis, pdo_mysql, pdo_pgsql, intl, curl, json, opcache and xml) - large image
FROM php:7-fpm
RUN apt-get update && apt-get install -y git libcurl4-gnutls-dev zlib1g-dev libicu-dev g++ libxml2-dev libpq-dev \
&& git clone -b php7-ipv6 https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis \
&& docker-php-ext-install pdo pdo_mysql pdo_pgsql pgsql intl curl json opcache xml redis \
&& apt-get autoremove && apt-get autoclean \
&& rm -rf /var/lib/apt/lists/*
# Dockerfile
FROM phusion/baseimage:0.9.17
MAINTAINER Auother <name@email.com>
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
RUN apt-get -y update
@mohamednizar
mohamednizar / Dockerfile
Created October 3, 2018 11:19
Dockerize React Project
# base image
FROM node:9.6.1
# set working directory
RUN mkdir /usr/app
WORKDIR /usr/app
# add `/usr/src/app/node_modules/.bin` to $PATH
ENV PATH /usr/app/node_modules/.bin:$PATH