Skip to content

Instantly share code, notes, and snippets.

View mhemrg's full-sized avatar

Mohammad Hossein Ebadollahi mhemrg

View GitHub Profile
@mhemrg
mhemrg / liara.json
Last active September 17, 2019 09:01
Flask module app
{
"platform": "docker",
"port": 8000,
"build-arg": {
"__FLASK_APPMODULE": "test:app"
}
}
@mhemrg
mhemrg / Dockerfile
Created September 24, 2019 07:06
PHP + Composer Dockerfile
ARG PHP_EXTENSIONS="bcmath bz2 calendar exif \
amqp gnupg imap mcrypt memcached \
mongodb sockets yaml \
gd gettext gmp igbinary imagick intl \
pcntl pdo_pgsql pgsql redis \
shmop soap sysvmsg \
apcu mysqli pdo_mysql \
sysvsem sysvshm wddx xsl opcache zip"
FROM thecodingmachine/php:7.2-v2-apache
@mhemrg
mhemrg / wp-config.php
Created October 8, 2019 11:51
WordPress + Environment Variables
/** MySQL database username */
define('DB_USER', getenv('DB_USER'));
/** MySQL database password */
define('DB_PASSWORD', getenv('DB_PASSWORD'));
/** MySQL hostname */
define('DB_HOST', getenv('DB_HOST'));
@mhemrg
mhemrg / liara.json
Created October 14, 2019 11:26
liara.json | Docker build args
{
"build-arg": {
"APP_KEY": "test-value"
}
}
ARG APP_KEY
FROM liararepo/laravel-platform:frontend
FROM liararepo/laravel-platform:backend
@mhemrg
mhemrg / Dockerfile
Created October 17, 2019 07:29
Docker + Python + LibSSL + wkhtmltopdf
FROM python:3.7
WORKDIR /app
RUN echo 'deb http://deb.debian.org/debian stretch main' >> /etc/apt/sources.list && \
apt-get update && \
apt-get autoremove -y && \
apt-get install -y libssl1.0-dev curl git nano wget && \
rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/partial/*
@mhemrg
mhemrg / deploy.sh
Created November 5, 2019 20:44
Deploy Drone to Liara
liara deploy --image drone/drone --port 80 --volume /var/lib/drone
@mhemrg
mhemrg / liara_nginx.conf
Created November 10, 2019 06:42
Liara - Django - Customize nginx conf
location /static {
alias /usr/src/app/staticfiles;
}
location / {
try_files $uri @django_app;
}
location ~\.sqlite3$ {
deny all;

SPF Record

You need to add a TXT record at the apex/root of your domain (@) with the following content. If you already send mail from another service, you may just need to add include:spf.mail.liara.ir to your existing record.

v=spf1 a mx include:spf.mail.liara.ir ~all

DKIM Record

You need to add a new TXT record with the name postal-qzIyus._domainkey with the following content.

v=DKIM1; t=s; h=sha256; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDduHIKdj8AdtOZ4rcFrt/P/UCqSvpYhkx4dXRUwcOyVqzfUs+E30Xa/MIJ2L3r+kaZrxkzPMay/rHH3W5rQm97zTHIj8vIVU3sL9ywrYvTnYFMXo/B5934gqRoN1UaA52P67yETDuxV+RwR3iH2sKV2Or18UvWql5ybNHa27VgAwIDAQAB;

SPF Record

You need to add a TXT record at the apex/root of your domain (@) with the following content. If you already send mail from another service, you may just need to add include:spf.mail.liara.ir to your existing record.

v=spf1 a mx include:spf.mail.liara.ir ~all

DKIM Record

You need to add a new TXT record with the name postal-NSa0Kl._domainkey with the following content.

v=DKIM1; t=s; h=sha256; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDKvZ1pNyTQt6T/1XfJdNFX8+5d1noZPJ9OkEArBF+am79oOR2nVxQOqFaxhQP0W4xctpPPrBegmkDk0GW4Gue+xrn7pX4UMUHgf/Vyg8B2c7NuHlTUhmrrk41CQTosP4GhDb1smEYSHU85FXrZtGQ8mpucyX0dGAxqGt7UJtElMwIDAQAB;