docker run \
-p 9000:9000 \
-p 9001:9001 \
--name localminio \
-v ~/minio/data:/data \
-e "MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| mysql: | |
| image: docker.io/bitnami/mysql:5.7.36 | |
| environment: | |
| - MYSQL_ROOT_PASSWORD=123 | |
| - MYSQL_USER=opencartuser | |
| - MYSQL_DATABASE=opencartdb | |
| - MYSQL_PASSWORD=opencart | |
| volumes: |
Updated version here https://github.com/castlecraft/custom_containers/blob/main/docs/docker-swarm.md
Follow these steps:
Install prerequisites:
apt-get update && apt-get dist-upgrade -y
dpkg-reconfigure --priority=low unattended-upgrades
adduser -D craft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| backend: | |
| image: frappe/erpnext:v14.12.0 | |
| deploy: | |
| restart_policy: | |
| condition: on-failure | |
| volumes: | |
| - sites:/home/frappe/frappe-bench/sites |
# for centos:8 docker container refer https://stackoverflow.com/a/70930049
# yum install yum-utils # installs yumdownloader
# 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 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 shPrepare Container:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/frappe/frappe/blob/develop/frappe/email/smtp.py | |
| import smtplib | |
| class SMTPServer: | |
| def __init__( | |
| self, | |
| server, | |
| login=None, | |
| password=None, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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', () => { |