Skip to content

Instantly share code, notes, and snippets.

@ilmir-k
ilmir-k / Letsencrypt Wildcard DNS manual.rst
Last active January 2, 2022 19:11 — forked from yelizariev/Letsencrypt Wildcard DNS manual.rst
Issue certificate with DNS manual mode

Certificate issue in DNS manual mode

Done according to https://github.com/Neilpang/acme.sh/wiki/dns-manual-mode

Warning: DNS manual mode can not renew automatically. For renewal you need to repeat steps below each time. Certificate needs to be renewed within 90 days.

  • Install client

    git clone https://github.com/Neilpang/acme.sh.git
    
@ilmir-k
ilmir-k / database_migration.rst
Created February 18, 2019 12:38 — forked from GabbasovDinar/database_migration.rst
Instruction about database migration of Odoo using openupgrade. Example migration of database from 7.0 to 8.0

Восстановление базы из Дампа

Если имеется дамп базы, то для миграции нуобходимо его развернуть (версии postgres для дамп и новой базы должны совпадать):

  1. sudo su - psql
  2. createdb odoo7db
  3. cd /home/diga/*PATH_TO_DUMP_DATABASE*
  4. psql odoo7db < odoo7db.dump
  5. psql -l - в таблице должна отображаться новая база.
@ilmir-k
ilmir-k / fix-bus-unavailable-error.rst
Created February 6, 2019 15:43
How to fix bus.bus unavailable error

# In case of error:

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 650, in _handle_exception
  return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 310, in _handle_exception
  raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise
  raise value
File "/odoo/odoo-server/odoo/http.py", line 692, in dispatch
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux

wkhtmltopdf installation

You can check here for getting the latest version. Change the wget url to download newer versions.

wkhtmltopdf 0.12.4 - Ubuntu 16.04 x64

Prerequisites

@ilmir-k
ilmir-k / access_server_by_ppk.txt
Created June 19, 2018 09:06
How to access server using ppk file
# Install putty-tools:
sudo apt-get install putty-tools
# Convert your .ppk file to .pem:
puttygen yourkey.ppk -O private-openssh -o yourkey.pem
# Set the proper permission to use the .pem file:
@ilmir-k
ilmir-k / docker-run.rst
Last active December 22, 2022 15:42
templates to run dockers

TEMPLATE 15.0

# launch:

DB_CONTAINER=db-odoo-15
ODOO_CONTAINER=odoo-15
ODOO_BRANCH=15.0
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name $DB_CONTAINER postgres:12.0
@ilmir-k
ilmir-k / dblist-in-docker.txt
Last active September 6, 2017 12:24
DB list in docker
# Open docker terminal
docker exec -i -u root -t $DB_CONTAINER /bin/bash
# Launch psql as POSTGRES_USER, e.g. odoo
psql -U odoo
# See existing DBs:
\l
# Quit from psql
\q
# Quit from docker
exit
@ilmir-k
ilmir-k / odoo.conf
Created July 25, 2017 15:33 — forked from ryanc-me/odoo.conf
Sample Odoo/Nginx Config (with dbfilter_from_header support)
# Author: Ryan Cole
# Website: https://ryanc.me
# GitHub: https://github.com/MGinshe
# Usage:
# Place this file in /etc/nginx/sites-enabled/
# Make sure you edit the DOMAIN_HERE and SSL_CERTIFICATE, and DB_FILTER sections
#
# Note: This config file is designed to be used with the Odoo dbfilter_from_header module
# https://apps.openerp.com/apps/modules/9.0/dbfilter_from_header/
#
su
# ivann + general
mkdir /root/.ssh
curl --silent https://github.com/yelizariev.keys | xargs echo -n >> /root/.ssh/authorized_keys
echo -ne " yelizariev@it-projects.info\n" >> /root/.ssh/authorized_keys
sed -i 's/PermitRootLogin no/PermitRootLogin without-password # changed by Ivan Yelizariev from value "no"/' /etc/ssh/sshd_config