Skip to content

Instantly share code, notes, and snippets.

View mhemrg's full-sized avatar

Mohammad Hossein Ebadollahi mhemrg

View GitHub Profile
const lockFile = '/tmp/laravel-echo-server.lock';
location /static {
alias /usr/src/app/staticfiles;
}
location / {
try_files $uri @django_app;
client_max_body_size 10M;
}
location ~\.sqlite3$ {
location / {
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
location / {
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
@mhemrg
mhemrg / Dockerfile
Created June 4, 2020 09:23
Sample Dockerfile
FROM liararepo/django-platform
RUN apt-get update && apt-get install -y git
{
"laravel": {
"postBuildCommands": [
"chown -R www-data:www-data storage"
]
}
}
!vendor
if(!$this->app->environment('build')) {
// Your code
}
@mhemrg
mhemrg / liara_nginx.conf
Last active May 18, 2020 11:45
Gzip settings for nginx
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
location / {
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
// eventinfo_ir/__init__.py
import pymysql
pymysql.version_info = (1, 3, 13, "final", 0)
pymysql.install_as_MySQLdb()