https://docs.docker.com/engine/swarm/swarm-tutorial/
swarm
-----
| - manager (alpha) [8GB HDD1/, 32GB HDD2/data, 4 Cores, 6GB RAM]
| import { Node, nodeInputRule } from "@tiptap/core"; | |
| import { mergeAttributes } from "@tiptap/react"; | |
| import { uploadImagePlugin, UploadFn } from "./upload_image"; | |
| /** | |
| * Tiptap Extension to upload images | |
| * @see https://gist.github.com/slava-vishnyakov/16076dff1a77ddaca93c4bccd4ec4521#gistcomment-3744392 | |
| * @since 7th July 2021 | |
| * |
| # please use python3 and flask > 1.0 | |
| # run this with : python3 flask_separate_thread.py | |
| # https://web.archive.org/web/20210329135424/https://pymotw.com/3/threading/ | |
| # https://web.archive.org/web/20210329135553/https://eli.thegreenplace.net/2011/08/22/how-not-to-set-a-timeout-on-a-computation-in-python | |
| import time | |
| import threading | |
| from flask import Flask | |
| app = Flask(__name__) |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | |
| <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script> | |
| <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"></script> | |
| <script> | |
| function _katex_render(elem) { | |
| renderMathInElement( | |
| elem, | |
| { | |
| delimiters: [ |
| import * as Y from 'yjs' | |
| import * as mutex from 'lib0/mutex.js' | |
| import { Observable } from 'lib0/observable.js' | |
| import PouchDB from 'pouchdb'; | |
| // This is the name of the top level Y.Map that is used to construct the main pouchDB | |
| // JSON document. | |
| const topDataYMapName = 'data'; |
| // app/modules/authentication/authentication.controller.ts | |
| import { Body, Controller, Post } from '@nestjs/common' | |
| import { RegisterRequest } from './requests' | |
| import { User } from '../../modules/user' | |
| import { UsersService } from '../users/users.service' |
| ENVIRONMENT=dev | |
| OTHER_CONFIG=BLAH |
https://docs.docker.com/engine/swarm/swarm-tutorial/
swarm
-----
| - manager (alpha) [8GB HDD1/, 32GB HDD2/data, 4 Cores, 6GB RAM]
| version: "3" | |
| services: | |
| traefik: | |
| image: "traefik:v2.2" | |
| ports: | |
| - "80:80" | |
| - "8080:8080" | |
| volumes: | |
| - "/var/run/docker.sock:/var/run/docker.sock:ro" |
| <?php | |
| try { | |
| /** | |
| * Throw exception if not found or is unreadable | |
| */ | |
| if ( !file_exists( __DIR__ . '/.env' ) || !is_readable( __DIR__ . '/.env' ) ) { | |
| throw new Exception( 'The .env file is not found or unreadable.' ); | |
| } | |
| /** | |
| * Get the .env file, ignore new and empty lines. |
| #!/bin/sh | |
| set -e | |
| vendor/bin/phpunit | |
| (git push) || true | |
| git checkout production | |
| git merge master |