https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca
#medium #docker #volumes #file_system
#medium #docker #volumes #file_system
Medium
Docker volumes and file system permissions
The docker volume feature offers a way to support persistent storage, but it comes with some gotchas regarding file system permissions.
https://www.toptal.com/python/introduction-python-microservices-nameko
#nameko #microservice #rabbitmq #python #docker #greenlet
#nameko #microservice #rabbitmq #python #docker #greenlet
Toptal
Introduction to Python Microservices With Nameko
We will focus on building a proof of concept microservices application using Python. For that, we will use Nameko, a Python microservices framework. It has RPC over AMQP built in, allowing for you to easily communicate between your services.
DO NOT USE UWSGI multi-threaded mode with alpine image!
I've been stuck on this issue for a couple of days as our service returned 503 Gateway timeout while our server load was totally ok around 1.0 (1m load average). So our load test got failed at the be beginning of the test! We found out it is related to docker base image of python alpine. Use python slim image instead. Or in case you have many changes you can stick with alpine and change thread to 1 in uswgi configuration file.
#docker #alpine #uwsgi #python #slim #respawn
I've been stuck on this issue for a couple of days as our service returned 503 Gateway timeout while our server load was totally ok around 1.0 (1m load average). So our load test got failed at the be beginning of the test! We found out it is related to docker base image of python alpine. Use python slim image instead. Or in case you have many changes you can stick with alpine and change thread to 1 in uswgi configuration file.
#docker #alpine #uwsgi #python #slim #respawn
For
- https://hub.docker.com/r/prom/alertmanager
Awesome
- https://github.com/samber/awesome-prometheus-alerts
- https://awesome-prometheus-alerts.grep.to/rules
So to add
You alert manager configuration may look something like below:
You should be up & running with this sample configurations.
Spread your love for M2SH :)
#prometheus #prom #alert #alert_manager #docker #dockerfile #slack
prometheus
you can use an alert manager, it has a docker file in the link below:- https://hub.docker.com/r/prom/alertmanager
Awesome
Prometheus
alerts:- https://github.com/samber/awesome-prometheus-alerts
alertmanager
has rules, you can see sample rules here in the following link:- https://awesome-prometheus-alerts.grep.to/rules
So to add
alertmanager
service:alertmanager:
image: prom/alertmanager:latest
restart: always
command: --config.file=/etc/alertmanager/alertmanager.yml
volumes:
- ./alert/config/alertmanager.yml:/etc/alertmanager/alertmanager.yml
dns:
- 8.8.8.8
You alert manager configuration may look something like below:
global:
resolve_timeout: 5m
route:
# When a new group of alerts is created by an incoming alert, wait at
# least 'group_wait' to send the initial notification.
# This way ensures that you get multiple alerts for the same group that start
# firing shortly after another are batched together on the first
# notification.
group_wait: 10s
# When the first notification was sent, wait 'group_interval' to send a betch
# of new alerts that started firing for that group.
group_interval: 5m
# If an alert has successfully been sent, wait 'repeat_interval' to
# resend them.
repeat_interval: 30m
# A default receiver
receiver: "slack"
# All the above attributes are inherited by all child routes and can
# overwritten on each.
routes:
- receiver: "slack"
group_wait: 10s
match_re:
severity: error|warning
continue: true
# - receiver: "sms"
# group_wait: 10s
# match_re:
# severity: error
# continue: true
receivers:
- name: "slack"
slack_configs:
- api_url: 'YOUR-WEBHOOK-URL'
send_resolved: true
channel: 'monitoring'
text: "{{ range .Alerts }}<!channel> {{ .Annotations.summary }}\n{{ .Annotations.description }}\n{{ end }}"
# - name: "sms"
# webhook_config:
# - url: http://a.b.c:8080/send/sms
# send_resolved: true
You should be up & running with this sample configurations.
Spread your love for M2SH :)
#prometheus #prom #alert #alert_manager #docker #dockerfile #slack
GitHub
GitHub - samber/awesome-prometheus-alerts: 🚨 Collection of Prometheus alerting rules
🚨 Collection of Prometheus alerting rules. Contribute to samber/awesome-prometheus-alerts development by creating an account on GitHub.
In
you want to install network tools (like ping) you need to install
You can squash your image size even further by some tips. When you install a package, linux distros first download the package and put it in a cache folder. In
To tell the OS to delete the cache after installation you can provide
There are some package like
y using
Great job guys! You have reduced your alpine docker images so much :)
#docker #linux #alpine #apk #virtual #no_cache #apk_del #apk_add
Dockerfile`s some people in the community use `alpine
base image in order to reduce docker image size. apk
is its package management tool that can be used to install OS packages. So for example ifyou want to install network tools (like ping) you need to install
netcat-openbsd
:apk add netcat-openbsd
You can squash your image size even further by some tips. When you install a package, linux distros first download the package and put it in a cache folder. In
Alpine
it is located in /var/cache/apk
.To tell the OS to delete the cache after installation you can provide
--no-cache
option to it:apk add --no-cache netcat-openbsd
There are some package like
g++
or git
that is needed on installation of some other packages. After installation those packages is useless and just increase image size. You can remove those packages by using
--virtual
command:apk add --no-cache --virtual .build-deps g++ \
&& # do you stuff here \
&& apk del .build-deps
Great job guys! You have reduced your alpine docker images so much :)
#docker #linux #alpine #apk #virtual #no_cache #apk_del #apk_add