Last active
June 4, 2019 13:34
-
-
Save Evshved/9f34dc16315b4ad8bf07e0f50301e69c to your computer and use it in GitHub Desktop.
docker
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-machine create --generic-ssh-user root \ | |
--engine-storage-driver overlay2 \ | |
--driver generic \ | |
--generic-ip-address=132.33.127.23 samecker.xx.com | |
docker-machine env samecker.xx.com | |
eval $(docker-machine env test.peakcpm.com) | |
docker-compose -f docker-compose.yml -f docker-compose.staging.yml build --no-cache backend | |
docker-compose -f docker-compose.yml -f docker-compose.staging.yml up -d | |
ветку можно указать в ./docker/rails/Dockerfile | |
Посмотерть последние логи. Работать без таба. | |
docker-compose exec backend tail -f log/staging.log | |
Зайти в запустившийся контейнер bash | |
docker exec -it 5243e3f0dc5f bash | |
Запустить image и войти в консоль. | |
docker run -ti --entrypoint=sh xtramile-stats-scaper/backend | |
Зайти в постгрес контейнер | |
docker exec -it 824112281bf9 psql -U postgres | |
Не забывать если нужно создать базу и провести миграции. | |
Зайти в запустившийся контейнер bash | |
docker exec -it 5243e3f0dc5f bash | |
Перезапустить nginx | |
docker-compose exec nginx sh | |
./entrypoint.sh | |
Посмотреть историю запросов в shell | |
history | grep ssh | |
Переместить файлы с текущей директории на сервер | |
rsync -av . [email protected]:~/fol | |
Заход в постгрес. | |
psql -U postgres -W | |
sudo /opt/bitnami/ctlscript.sh restart apache - restart apache2 in bitnami |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment