Start Container:
docker run --rm -it \
-v $PWD/data/gcloud:/root \
-v /var/run/docker.sock:/var/run/docker.sock \
-e "TERM=xterm-256color" google/cloud-sdk:alpine sh
Prepare Container:
# License: MIT | |
# Store signatures in "Digital Signature" | |
# it uploads signatures on S3 for secure storage. | |
# Code snippet to fetch signature and sign document | |
import io | |
import os | |
import ntpath | |
import boto3 | |
import botocore.exceptions |
const mqtt = require("mqtt"); | |
const client = mqtt.connect("mqtt://event-bus:1883", { | |
clientId: require('crypto').randomUUID(), | |
clean: true, | |
connectTimeout: 4000, | |
username: 'emqx', | |
password: 'public', | |
reconnectPeriod: 1000, | |
}); | |
client.on('connect', () => { |
# https://github.com/frappe/frappe/blob/develop/frappe/email/smtp.py | |
import smtplib | |
class SMTPServer: | |
def __init__( | |
self, | |
server, | |
login=None, | |
password=None, |
def terminal_websocket(name: str, namespace: str, command: list[str], container: str = None): | |
load_config() | |
core_v1_api = client.CoreV1Api() | |
resp = stream( | |
core_v1_api.connect_get_namespaced_pod_exec, | |
name=name, | |
namespace=namespace, | |
container=container, | |
command=command, | |
stderr=True, |
Start Container:
docker run --rm -it \
-v $PWD/data/gcloud:/root \
-v /var/run/docker.sock:/var/run/docker.sock \
-e "TERM=xterm-256color" google/cloud-sdk:alpine sh
Prepare Container:
# for centos:8 docker container refer https://stackoverflow.com/a/70930049
# yumdownloader --assumeyes --destdir=$HOME/downloads/rpms --resolve {package-name}
sudo yum install -y --cacheonly --disablerepo=* $HOME/downloads/rpms/*.rpm
# Following command needs Python 3.10 installed. Refer Section below
sudo pip3.10 install --no-index --find-links file:$HOME/downloads/pip frappe-bench
version: "3" | |
services: | |
backend: | |
image: frappe/erpnext:v14.12.0 | |
deploy: | |
restart_policy: | |
condition: on-failure | |
volumes: | |
- sites:/home/frappe/frappe-bench/sites |
# Video: https://youtu.be/b-KFj8GfvzE | |
# Full Backup | |
mariadb-backup --backup \ | |
--user=$DB_ROOT_USER \ | |
--password=$DB_ROOT_PASSWORD \ | |
--target-dir=$BACKUP_BASE_DIR | |
# Incremental Backup | |
mariadb-backup --backup \ | |
--user=$DB_ROOT_USER \ |
Follow these steps:
Install prerequisites:
apt-get update && apt-get dist-upgrade -y
dpkg-reconfigure --priority=low unattended-upgrades
adduser -D craft