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
FROM alpine | |
RUN apk add --update ruby ruby-dev curl ruby-rdoc ruby-irb && rm /var/cache/apk/* | |
RUN gem update --system && gem install systemd_mon slack-notifier --no-ri --no-rdoc | |
RUN curl -fsSL curl.haxx.se/ca/cacert.pem -o "$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')" | |
CMD ["systemd_mon","/systemd_mon/systemd_mon.yml"] |
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
find . -name "* *" -type d | rename 's/ /_/g' | |
find . -name "* *" -type f | rename 's/ /_/g' |
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
#!/bin/bash | |
running=$(docker ps | grep emby | awk '{print $1}') | |
echo $running | |
docker_image=emby/embyserver | |
docker_repository=https://registry.hub.docker.com/v2/repositories/emby/embyserver/tags/ | |
date_hub=$(curl -s -S $docker_repository | jq '.results[] | select(.name == "latest") | .last_updated' | sed 's/\"//g' | cut -c 1-10) | |
echo "build date from Docker hub:" $date_hub | |
date_image=$(docker inspect $docker_image | jq '.[] .Created' | sed 's/\"//g' | cut -c 1-10) |
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
curl -s -S "https://registry.hub.docker.com/v2/repositories/emby/embyserver/tags/" | jq '.results[] | select(.name == "latest") | .last_updated' |
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
{{range service "smilio_178238"}} | |
DEL "frontend:{{env "HOSTNAME"}}" | |
RPUSH "frontend:{{env "HOSTNAME"}}" {{env "HOSTNAME"}} | |
{{range service "smilio_178238"}} | |
RPUSH "frontend:{{env "HOSTNAME"}}" http://{{.Address}}:{{.Port}} | |
{{end}} | |
{{end}} |
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
#cloud-config | |
write-files: | |
- path: /etc/conf.d/nfs | |
permissions: '0644' | |
content: | | |
OPTS_RPC_MOUNTD="" | |
users: | |
- name: XYZ | |
groups: |
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
Register a json formatted ecs task definition: | |
aws ecs register-task-definition --cli-input-json file://path/to/json | |
if you register the same definition again, ecs automatically creates a new revision, revisions of tasks can be choosen for running tasks or services "task:revision" | |
Create a long running ecs service with an existing task definition | |
aws ecs create-service --cluster clustern_name --service-name service_name --task-definition task:revision --desired-count 1 | |
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
{ | |
"family": "smilio_instanz_id", | |
"containerDefinitions": [ | |
{ | |
"name": "smilio_instanz_id", | |
"image": "codemonauts/docker-craft", | |
"cpu": 200, | |
"memory": 128, | |
"portMappings": [{ | |
"containerPort": 80, |
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
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") |
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
[Unit] | |
Description=backup styleranking podio assets to amazon s3 | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
KillMode=none | |
ExecStartPre=-/usr/bin/docker kill styleranking.podio-backup | |
ExecStartPre=-/usr/bin/docker rm -f styleranking.podio-backup | |
ExecStartPre=/usr/bin/docker pull kgorskowski/podio-backup |