Skip to content

Instantly share code, notes, and snippets.

View mhemrg's full-sized avatar

Mohammad Hossein Ebadollahi mhemrg

View GitHub Profile
@mhemrg
mhemrg / .env
Created March 3, 2019 12:51
Liara - Wordpress settings
WORDPRESS_DB_HOST=s1.liara.ir:PORT
WORDPRESS_DB_USER=test
WORDPRESS_DB_PASSWORD=secret
@mhemrg
mhemrg / Dockerfile
Created March 4, 2019 11:36
Liara - PHP Dockerfile
FROM php:7.2-apache
COPY . /var/www/html
@mhemrg
mhemrg / wp-config.php
Created March 4, 2019 18:39
Liara - Wordpress HTTPS config
<?php
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
@mhemrg
mhemrg / Dockerfile
Created March 13, 2019 11:34
Liara - DotNetCore Runtime
FROM microsoft/dotnet:aspnetcore-runtime
WORKDIR /app
COPY . /app
ENTRYPOINT ["dotnet", "coretest1.dll"]
@mhemrg
mhemrg / Dockerfile
Last active March 24, 2019 10:50
Liara | Laravel platform without npm
FROM thecodingmachine/php:7.2-v2-apache-node8
ENV APACHE_DOCUMENT_ROOT=/public \
TEMPLATE_PHP_INI=production \
PHP_EXTENSIONS="amqp bcmath calendar exif gd gettext \
gmp gnupg igbinary imagick imap intl ldap mcrypt memcached \
mongodb pcntl pdo_dblib pdo_pgsql pgsql sockets yaml"
USER root
@mhemrg
mhemrg / Dockerfile
Created March 26, 2019 10:58
Liara - Node 10
FROM node:10
WORKDIR /app
COPY . .
RUN npm install && npm run --if-present build
CMD npm start
@mhemrg
mhemrg / Dockerfile
Created April 16, 2019 12:40
Liara - Laravel platform with no-scripts
FROM thecodingmachine/php:7.2-v2-apache-node8
ENV APACHE_DOCUMENT_ROOT=/public \
TEMPLATE_PHP_INI=production \
PHP_EXTENSIONS="amqp bcmath calendar exif gd gettext \
gmp gnupg igbinary imagick imap intl ldap mcrypt memcached \
mongodb pcntl pdo_dblib pdo_pgsql pgsql sockets yaml"
USER root
@mhemrg
mhemrg / liara_nginx.conf
Last active April 28, 2019 12:19
Liara - Redirect to SSL with GZip enabled
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
location / {
index index.html index.htm;
if ($scheme = http) {
return 301 https://www.$host$request_uri;
@mhemrg
mhemrg / Dockerfile
Created May 13, 2019 06:52
Liara | Extend Laravel Platform
FROM liararepo/laravel-platform:frontend
FROM liararepo/laravel-platform:backend
RUN chgrp -R www-data /var/www/html/lib/vendor
RUN chmod -R ug+rwx /var/www/html/lib/vendor