- Download docker-compose.yml to dir named
sentry
- Change
SENTRY_SECRET_KEY
to random 32 char string - Run
docker-compose up -d
- Run
docker-compose exec sentry sentry upgrade
to setup database and create admin user - (Optional) Run
docker-compose exec sentry pip install sentry-slack
if you want slack plugin, it can be done later - Run
docker-compose restart sentry
- Sentry is now running on public port
9000
This file contains 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
import requests | |
import subprocess | |
GROUP_ID = '' | |
BOT_TOKEN = '' | |
BASE_URL = f'https://api.telegram.org/bot{BOT_TOKEN}/sendMessage?chat_id={GROUP_ID}&text=' | |
docker_ps = "echo -n <password> | sudo docker ps --format '{{.Status}}' | awk '{print $1}'" | |
docker_stats = "sudo docker stats --all --no-stream --format 'table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}'" |
This file contains 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
RUN apt update | |
RUN apt upgrade -y | |
RUN apt install -y apt-utils | |
RUN a2enmod rewrite | |
RUN apt install -y libmcrypt-dev | |
RUN docker-php-ext-install mcrypt | |
RUN apt install -y libicu-dev | |
RUN docker-php-ext-install -j$(nproc) intl | |
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |
This file contains 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
pm2 start app.js --interpreter ./node_modules/.bin/babel-node |
This file contains 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_posts = $wpdb->get_results(" | |
SELECT wp_posts.ID,wp_posts.post_date,wp_posts.post_title,wp_posts.post_name, | |
wp_terms.name,wp_terms.slug,wp_term_taxonomy.description | |
from wp_posts | |
join wp_term_relationships on wp_posts.ID = wp_term_relationships.object_id | |
join wp_terms on wp_term_relationships.term_taxonomy_id = wp_terms.term_id | |
join wp_term_taxonomy on wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id | |
WHERE wp_posts.post_status = 'publish' | |
ORDER BY wp_terms.slug,wp_posts.ID; | |
", ARRAY_A); |