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
# in the .ssh/config file | |
Host internalvia | |
HostName final.hostname.com | |
User secretdeployuser | |
IdentityFile ~/.ssh/id_rsa | |
ProxyCommand ssh public-server.com -W %h:%p |
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
--- | |
- hosts: all | |
remote_user: ubuntu | |
vars: | |
app_repo: [email protected]:*******/******.git | |
app_id: app_name | |
app_folder: /home/ubuntu/app_name | |
log_folder: /home/ubuntu/app_name_logs | |
tasks: | |
- name: git clone |
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
--- | |
- hosts: all | |
remote_user: ubuntu | |
vars: | |
app_repo: [email protected]:****/****.git | |
app_id: my_app | |
app_folder: /home/ubuntu/my_app | |
log_folder: /home/ubuntu/my_app_logs | |
tasks: | |
- name: git clone |
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
You will need to save the docker image as a tar file: | |
sudo docker save -o <save image to path> <image name> | |
Then copy your image to a new system with regular file transfer tools such as cp or scp. After that you will have to load the image into docker: | |
sudo docker load -i <path to image tar file> |
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
Where do I get nsenter? | |
Check jpetazzo/nsenter on GitHub. The short version is that if you run: | |
docker run -v /usr/local/bin:/target jpetazzo/nsenter | |
… this will install nsenter in /usr/local/bin and you will be able to use it immediately. | |
nsenter might also be available in your distro (in the util-linux package). | |
How do I use it? | |
First, figure out the PID of the container you want to enter: |
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
sudo usermod -aG docker $user | |
then you need to login logoff |
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
fallocate -l 1G one_gig_file |
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
var casper = require('casper').create(); | |
var content = null; | |
var url = 'http://www.google.com'; | |
casper.start(url, function() {}); | |
casper.then(function() { | |
content = this.getHTML(); | |
}); |
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
server { | |
listen 80; | |
server_name bets.sansot.fr; | |
access_log /var/log/nginx/bets.log combined; | |
error_log /var/log/nginx/bets.log; | |
location / { |
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
# disk space used by docker | |
sudo du -sh /var/lib/docker |