Postgresql jsonb querys

Create table with pgjson CREATE TABLE asu_clients_activity_jsonb ( id serial primary key, pg_timestamp timestamp default NULL, data jsonb ); Select from records distink by last timestamp SELECT DISTINCT ON (client_id) pg_timestamp AS «@timestamp», data->>’client_id’ AS client_id, data->’client.env’->>’asu_hosts_ssl’ AS asu_hosts_ssl, data->>’asu_version’ AS asu_version, data->’asu_clients_activity’->>’companies’ AS companies, data->’asu_clients_activity’->>’users_count’ AS users_count, data->’asu_clients_activity’->>’area_of_​​houses_thousand(sqm)’ AS area_of_houses_thousand, data->>’global_auth_token’ AS global_auth_token FROM […]

Читать далее…

Run Samba on Docker-compose

How run samba with docker and docker-compose? Docker-compose file for samba mkdir -p /docker-compose/services/samba cd /docker-compose/services/samba vim docker-compose.yml Add data to file version: ‘3.4’ services: samba: image: devsadds/samba:1.0.0 container_name: samba restart: unless-stopped stdin_open: true tty: true environment: # timszone, ex: ‘Asia/Yekaterinburg’ TZ: «Asia/Yekaterinburg» # advertise shares, default: true, or false (open ports 137, 138) NMBD: […]

Читать далее…