Sometimes typing docker-compose up is too long to type. The best to make it shorter is to create aliases like alias ll="ls -al" but this is only temporary.
To make it a permanent aliases edit the ~/.bashrc and add the following
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias dbup='docker-compose up -d db'
alias up='docker-compose up app'
alias stop='docker-compose stop'
alias re='docker-compose restart'
alias logs='docker-compose logs -f --tail 10'
refresh
source ~/.bashrc
Eureka!
Thursday, August 30, 2018
Monday, August 27, 2018
Copy file or folder from docker container to host
Odoo11
$docker cp odoo11:/usr/lib/python3/dist-packages/odoo/addons addons
Friday, August 24, 2018
Package control and GITSavvy for sublime
Since I worked in python I always use sublime as my main editor. It's super sleek, fast and lightweight. On the other hand, using GIT is better than using SVN but you need to learn at least the basic git commands and I'll tell you that it super hard at first.
I found this tool to be installed in sublime as a helper when you use GIT.
Install the package control first
https://packagecontrol.io/installation#st3
https://mijingo.com/blog/sublime-text-package-control
after installing, just open up the package control by pressing ctrl+shift p. Install GITSavvy and that's it. Eureka!
Monday, August 6, 2018
Jasper Server 2.0
In my previous post http://skytechguyver.blogspot.com/search/label/Jasper I was able to run in docker and though it is running I think its lacking something.
And I found this link https://github.com/TIBCOSoftware/js-docker and I think this is the right way for my jasper server setup in my development machine.
The documentation is understandable except when I run the docker-compose. I got this error in a jasperserver-pro name because when you download the zip file from https://community.jaspersoft.com/project/jasperreports-server/releases the default name is already changed to jasperserver instead of jasperserver-pro.
And I found this link https://github.com/TIBCOSoftware/js-docker and I think this is the right way for my jasper server setup in my development machine.
The documentation is understandable except when I run the docker-compose. I got this error in a jasperserver-pro name because when you download the zip file from https://community.jaspersoft.com/project/jasperreports-server/releases the default name is already changed to jasperserver instead of jasperserver-pro.
Overall, it was awesome I can run localhost:8080/jasperserver
So, right now I want to try to download the latest jasperserver 7.1.0 and add into resources and build again the docker.
Sunday, August 5, 2018
Vagrant forwarded port already in use
Conflict with existing port
Solution:
- Install first the TCPView https://docs.microsoft.com/en-us/sysinternals/downloads/tcpview
- Find the desired port and end process
That's it! Eureka.
How to make folder writable in ubuntu
That makes the directory writable, readable and executable by anybody
sudo chmod 777 directory
It will give all permission except write by anybody.
It will give all permission except write by anybody.
sudo chmod 775 'your directory'
Postgres backup and restore
Backup commands
- pg_dump db_name > db_backup.sql
- pg_dumpall > cluster_backup.sql
Restore commands
- psql db_name < db_backup.sql
- psql -f cluster_backup.sql postgres
Using compression
- pg_dump db_name | gzip > db_backup.gz
- pg_dumpall | gzip > cluster_backup.gz
Restore
- gunzip -c db_backup.gz | psql db_name
- gunzip -c cluster_backup.gz | psql postgres
reference:
https://www.rubytreesoftware.com/resources/basic-postgresql-backup-and-restore/
- pg_dump db_name > db_backup.sql
- pg_dumpall > cluster_backup.sql
Restore commands
- psql db_name < db_backup.sql
- psql -f cluster_backup.sql postgres
Using compression
- pg_dump db_name | gzip > db_backup.gz
- pg_dumpall | gzip > cluster_backup.gz
Restore
- gunzip -c db_backup.gz | psql db_name
- gunzip -c cluster_backup.gz | psql postgres
reference:
https://www.rubytreesoftware.com/resources/basic-postgresql-backup-and-restore/
Cron job
sudo crontab -e
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday; 7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * * command_to_execute
0 0 * * * /opt/odoo12/run_backup.sh
Thursday, August 2, 2018
Vagrant error
I had encountered similar error below
and I think when I installed vagrant plugin called vagrant-dns
It happens that I need to reinstall vagrant which took a lot of time but still the error persists.
After digging into the internet for a solution, I finally found it. Damn it!
$ vagrant plugin uninstall vagrant-dns
Well, at least I know now.
Adios!
Wednesday, August 1, 2018
Gitlab self-hosted
It's been a while that I have done trial and error installing Gitlab on my local machine and I find some interesting way of learning.
1st attempt
So first of all, I started to install Gitlab directly using someone's code base from github.
Looks promising, I will give it a try
https://gist.github.com/cjtallman/b526d8c7d8b910ba4fd41eb51cd5405b
I don't know what happen when I execute vagrant up but I was astonished
2nd attempt
This time, I read another tutorial with more details and videos
update: 2018-08-07
https://codereviewvideos.com/course/your-own-private-github
steps:
sudo apt-get update
1st attempt
So first of all, I started to install Gitlab directly using someone's code base from github.
Looks promising, I will give it a try
https://gist.github.com/cjtallman/b526d8c7d8b910ba4fd41eb51cd5405b
I don't know what happen when I execute vagrant up but I was astonished
2nd attempt
This time, I read another tutorial with more details and videos
update: 2018-08-07
https://codereviewvideos.com/course/your-own-private-github
steps:
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates
sudo apt-get install -y postfix
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_11.1.4-ce.0_amd64.deb/download.deb
sudo dpkg -i gitlab-ce_11.1.4-ce.0_amd64.deb
sudo gitlab-ctl reconfigure
3rd attempt
This time, is my favorite docker installation. hope everything's okay
Installation using Docker
https://hub.docker.com/r/gitlab/gitlab-ce/
https://docs.gitlab.com/omnibus/docker/
sudo gitlab-ctl reconfigure
3rd attempt
This time, is my favorite docker installation. hope everything's okay
Installation using Docker
https://hub.docker.com/r/gitlab/gitlab-ce/
https://docs.gitlab.com/omnibus/docker/
Subscribe to:
Posts (Atom)
free online comma separating tool
https://delim.co/#
-
In my current company, I'm using Visual Paradigm for my documentation task. If you go there site, you can either download community and ...
-
One of the functionality in our system is can able to generate a report using Jasper report. We have a Jasper server setup in another ip ad...
-
https://www.liquidweb.com/kb/how-to-install-nvm-node-version-manager-for-node-js-on-ubuntu-12-04-lts/