Langsung ke konten utama

Postingan

Menampilkan postingan dari Juni, 2018

PostgreSQL

Install postgresql $ sudo apt install postgresql Purge (clean uninstall) postgresql $ sudo service postgresql stop $ sudo apt --purge remove postgresql\* $ sudo rm -rf /var/lib/postgresql/ $ sudo userdel -r postgres Install pgadmin $ docker run -p 80:80 -e "PGADMIN_DEFAULT_EMAIL=user@domain.com" -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" -d dpage/pgadmin4 Access postgresql $ sudo -u postgres psql postgres See list of user postgres=# \du See list of database postgres=# \l Connect database postgres=# \c postgres Create user $ sudo -u postgres createuser lite Quit postgresql postgres=# \q

Proxy VPS - Proxy Docker - Proxy Container

Setting proxy di VPS yang tidak punya IP Public: $ sudo nano /etc/environment  Tambahkan http_proxy=http://10.210.9.74:8888 https_proxy=https://10.210.9.74:8888 Acquire::http::proxy "http://10.210.9.74:8888"; Acquire::https::proxy "https://10.210.9.74:8888"; Setting proxy di Docker: $ nano /etc/default/docker Tambahkan export http_proxy="http://10.210.9.74:8888" export https_proxy="https://10.210.9.74:8888" $ sudo service docker stop $ sudo service docker start Setting proxy di container (menggunakan docker-compose.yml): services:   api:     environment:       http_proxy: http://10.210.9.74:8888       https_proxy: https://10.210.9.74:8888     image: qisme:v249     ports:     - 80:1000/tcp     restart: always     volumes:     - /home/qisme:/api:rw