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 service update \ | |
--update-parallelism 1 \ | |
--update-delay 5s \ | |
--update-order stop-first \ | |
--image { your docker iamge } \ | |
--force \ | |
--with-registry-auth \ | |
api |
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 service update \ | |
--update-parallelism 1 \ | |
--update-delay 5s \ | |
--update-order stop-first \ | |
--image 460957833:나의 이미지 예시 \ | |
--force \ | |
--with-registry-auth \ | |
api |
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 service update \ | |
--update-parallelism 1 \ | |
--update-delay 5s \ | |
--update-order stop-first \ | |
--image 460957833:나의 이미지 예시 \ | |
--force \ | |
--with-registry-auth \ | |
api |
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
apk update && apk upgrade && \ | |
apk add --no-cache bash git openssh |
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
global: | |
scrape_interval: 30s | |
evaluation_interval: 30s | |
external_labels: | |
monitor: "prometheus-swarm" | |
rule_files: | |
scrape_configs: | |
- job_name: 'prometheus' |
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 stack deploy --compose-file ./docker-stack.yml prom-stack | |
version: "3" | |
services: | |
prometheus: | |
image: prom/prometheus:latest | |
networks: | |
- monitoring | |
ports: | |
- 9001:9090 |
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
ECR=$(docker exec -it guide-aws sh -c 'aws ecr get-login --no-include-email --region ap-northeast-2') | |
echo "creating login temp file" | |
_ECR=$(echo ${ECR} | tr -d '\r') | |
echo ${_ECR} > ecr.out | |
echo 'login into ecr' | |
$(cat ecr.out) | |
echo "removing temp file" | |
rm ecr.out |
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
version: "3" | |
networks: | |
monitoring: | |
app-backend: | |
services: | |
cadvisor: | |
image: google/cadvisor:${CADVISOR_VERSION:-v0.26.1} | |
networks: |
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
## reference | |
## https://stackoverflow.com/questions/13162771/django-how-to-see-sql-query-when-running-tests | |
from django.db import connection, reset_queries | |
from django.test import override_settings, TransactionTestCase | |
class TransactionTests(TransactionTestCase): | |
@override_settings(DEBUG=True) | |
def test_sql(self): |
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
deleteCharHandler = (index) => { | |
const text = this.state.content.split(''); | |
text.splice(index, 1); | |
const updatedText = text.join(''); | |
this.setState({content: updatedText}); | |
} |