$ curl -gs http://localhost:8081/rpc/concat?a_arg1=prefix&a_arg2=suffix
{
"success": true,
"result": [
{
"concat": "prefixsuffix"
MY_HOST=demo.dcape.ru | |
[email protected] | |
git clone https://github.com/dopos/dcape.git | |
make install ACME=wild DNS=wild DCAPE_DOMAIN=${MY_HOST} \ | |
TRAEFIK_ACME_EMAIL=${LE_ADMIN} PDNS_LISTEN=$(dig +short $MY_HOST):53 | |
make echo-gitea-admin-pass |
# app custom Makefile | |
SHELL = /bin/sh | |
CFG = .env | |
# ------------------------------------------------------------------------------ | |
# app custom config | |
# comments prefixed with '#- ' will be copied to $(CFG).sample | |
#- Postgresql container name (access via docker) |
#!/bin/sh | |
# Postgresql version upgrade script for dcape | |
# Uses tianon/postgres-upgrade docker image | |
# See also: | |
# * https://github.com/tianon/docker-postgres-upgrade | |
# * https://dopos.github.io/dcape/ | |
# Restart after upgrade | |
# * dcape-app-pg-backup |
<!-- | |
MIT License | |
Source: https://gist.github.com/LeKovr/d6ee7d31c65a4b7e90d8d94295e4d535 | |
Copyright (c) 2021 Aleksei Kovrizhkin (LeKovr) | |
Original version: https://github.com/pseudomuto/protoc-gen-doc/blob/v1.4.1/resources/markdown.tmpl | |
Copyright (c) 2017 David Muto (pseudomuto) | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
create or replace function xml_pretty(xml) | |
returns xml as $$ | |
-- requires xml2 pg extension | |
-- https://postgres.cz/wiki/PostgreSQL_SQL_Tricks#Pretty_xml_formating | |
select xslt_process($1::text,' | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:strip-space elements="*" /> | |
<xsl:output method="xml" indent="yes" /> | |
<xsl:template match="node() | @*"> | |
<xsl:copy> |
/* | |
Пример создания функции postgresql средствами psql. | |
Функция возвращает строки по ключу без обращения к таблицам | |
Исходные данные размещены в файле json | |
*/ | |
-- содержимое файла с данными, для логов | |
\! cat args.json | |
/* | |
{ |
# Bootstrapping vue.js project with docker | |
# Requires: make, docker | |
# Copyright: Aleksei Kovrizhkin <[email protected]> | |
# License: MIT | |
# | |
# Place this file into empty dir and run | |
# make simple | |
# (be ready to answer questions about your new project) | |
# | |
# After complete you can run your sample project in development mode: |
/* | |
concat - sample function for dbrpc demo | |
See https://github.com/LeKovr/dbrpc | |
*/ | |
CREATE OR REPLACE FUNCTION concat( | |
a_arg1 TEXT | |
, a_arg2 TEXT DEFAULT '' | |
) RETURNS TEXT IMMUTABLE LANGUAGE 'plpgsql' AS | |
$_$ | |
BEGIN |