mkir gpt4all
cd gpt4all
vim -O Dockerfile docker-compose.yml
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: | |
db: | |
restart: always | |
image: postgres:14-alpine | |
shm_size: 256mb | |
healthcheck: | |
test: ['CMD', 'pg_isready', '-U', 'postgres'] | |
volumes: | |
- ./postgres14:/var/lib/postgresql/data |
sudo apt-get update
sudo apt-get -y upgrade
echo "deb http://repo.pritunl.com/stable/apt focal main" | sudo tee /etc/apt/sources.list.d/pritunl.list
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
sudo apt update
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
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
name: restart-deploy | |
namespace: testns | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: |
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
I choosed host path mapping for postgresql data directory in a separate OS disk to be able to resize partition later. | |
You can use docker standart volumes too. | |
# mkdir -p /data/timescaledb | |
# cat docker-compose.yml | |
version: '3' | |
services: |
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
ssl_certificate /etc/nginx/ssl/sonar.domain.tld/cert.pem; | |
ssl_certificate_key /etc/nginx/ssl/sonar.domain.tld/privkey.pem; | |
upstream sonar { | |
server 127.0.0.1:9000 fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name sonar.domain.tld; |
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
from django.contrib.auth.models import User, Group | |
from rest_framework import permissions | |
def is_in_group(user, group_name): | |
try: | |
return Group.objects.get(name=group_name).user_set.filter(id=user.id).exists() | |
except Group.DoesNotExist: | |
return False | |
class HasGroupPermission(permissions.BasePermission): |
generated via plantuml
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
Siyah ş’utz’e ш1уц1э | |
Beyaz fıjı фыжьы | |
Kırmızı ptlıjı плъыжьы | |
Kahverengi haptlı хьаплъы | |
Yeşil vıtzışo уцышъо |
NewerOlder