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
| kill $(ps aux | grep 'telegramapi.py' | awk '{print $2}') |
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
| # There was a warning about LANG, when used 'pipenv', so I have added it to conf: | |
| export LANG="en_US.UTF-8" | |
| export LC_ALL="en_US.UTF-8" | |
| export LC_CTYPE="en_US.UTF-8" | |
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" |
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
| # All commands below is concern to CentOS 6/7 or other RedHat-based Linux distro: | |
| # MongoDB installation: | |
| sudo vim /etc/yum.repos.d/mongodb-org.repo # Content for 'mongodb-org.repo' in another gist! | |
| yum repolist | |
| sudo yum -y install mongodb-org # Installation with yum | |
| # MongoDB starting (as daemon): | |
| mongod --fork --logpath /var/log/mongodb.log | |
| # MongoDB startign with auth controll: |
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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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
| docker exec -t <your container name> gitlab-rake gitlab:backup:create |
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
| # It seems the migrations did not complete. Did you run reconfigure again to see if this gets resolved? | |
| # Also check gitlab-rake db:migrate:status. You can try to run the migrations manually with gitlab-rake db:migrate. | |
| # Make sure postgres is running. | |
| gitlab-rake db:migrate |
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 docker-compose up -d | |
| # docs say we should run reconfigure at least once | |
| sudo docker exec dockerinfrastructure_gitlab_1 gitlab-cal reconfigure | |
| # lets check everything is working after first up | |
| sudo docker exec dockerinfrastructure_gitlab_1 gitlab-rake gitlab:check SANITIZE=true | |
| # restore backup now | |
| sudo docker cp 1460934678_gitlab_backup.tar dockerinfrastructure_gitlab_1:/var/opt/gitlab/backups | |
| sudo docker exec dockerinfrastructure_gitlab_1 gitlab-ctl stop unicorn | |
| sudo docker exec dockerinfrastructure_gitlab_1 gitlab-ctl stop sidekiq | |
| sudo docker exec dockerinfrastructure_gitlab_1 chmod -R 775 /var/opt/gitlab/backups |
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
| #!/bin/bash | |
| first=25601 | |
| step=100 | |
| while [ $first -lt 130900 ] | |
| do | |
| ./app/console app:patients:load --default_pathname="$first" --default_filename="$step" & wait $! | |
| first=$(($first+$step)) | |
| done |
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
| #!/bin/bash | |
| # Run docker nginx-proxy container | |
| docker run -d -p 80:80 -p 443:443 \ | |
| -v /home/anton/ssl-keys:/etc/nginx/certs \ | |
| -v /etc/letsencrypt/archive:/etc/letsencrypt/archive:ro \ | |
| -v /etc/letsencrypt/live:/etc/letsencrypt/live:ro \ | |
| -v /var/run/docker.sock:/tmp/docker.sock:ro \ | |
| jwilder/nginx-proxy |
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
| # recursively find the amount stored in directories (with depth 1) | |
| sudo du -h / -d 1 | |
| # clearing of every unused Docker containers | |
| # ( finded from: http://stackoverflow.com/questions/32723111/how-to-remove-old-and-unused-docker-images ) | |
| docker rm -v $(docker ps --filter status=exited -q 2>/dev/null) 2>/dev/null | |
| docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null | |
| # making backup of Docker (docker-ce deploying as Docker container) | |
| docker exec -i gitlab-container-name /opt/gitlab/bin/gitlab-rake gitlab:backup:create |