DRONE : my hugo pipeline

Tools CI/CD https://docs.drone.io/ https://gitea.io/en-us/ Blog https://gohugo.io/ https://github.com/adityatelange/hugo-PaperMod as git submodule Pipeline .drone.yml kind: pipeline type: docker name: default # default clone doesn't recursive clone: disable: true steps: - name: clone-with-submodules image: plugins/git pull: if-not-exists settings: depth: 50 recursive: true - name: build image: klakegg/hugo pull: if-not-exists commands: - hugo - name: deploy image: drillster/drone-rsync settings: user: from_secret: deploy-blog-user hosts: from_secret: deploy-blog-host key: from_secret: deploy-blog-key source: ./public target: /home/www/releases/${DRONE_BUILD_NUMBER} script: - ln -sfn /home/www/releases/${DRONE_BUILD_NUMBER}/public /home/www/b when: branch: include: - master trigger: branch: - master - dev Badge ...

18 juin 2022 ยท 1 min

Opensearch alternative to Elasticsearch

https://www.opensearch.org/ opensearch opensearch-dashboards logstash Works with rootless podman with podman-compose version: '3' services: opensearch-node1: image: opensearchproject/opensearch:1.3.1 container_name: opensearch-node1 environment: - cluster.name=opensearch-cluster - node.name=opensearch-node1 - discovery.seed_hosts=opensearch-node1,opensearch-node2 - cluster.initial_master_nodes=opensearch-node1,opensearch-node2 #- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM # ulimits: # memlock: # soft: -1 # hard: -1 # nofile: # soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems # hard: 65536 volumes: - opensearch-data1:/usr/share/opensearch/data ports: - 9200:9200 - 9600:9600 # required for Performance Analyzer networks: - opensearch-net opensearch-node2: image: opensearchproject/opensearch:1.3.1 container_name: opensearch-node2 environment: - cluster.name=opensearch-cluster - node.name=opensearch-node2 - discovery.seed_hosts=opensearch-node1,opensearch-node2 - cluster.initial_master_nodes=opensearch-node1,opensearch-node2 #- bootstrap.memory_lock=true - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # ulimits: # memlock: # soft: -1 # hard: -1 # nofile: # soft: 65536 # hard: 65536 volumes: - opensearch-data2:/usr/share/opensearch/data networks: - opensearch-net opensearch-dashboards: image: opensearchproject/opensearch-dashboards:1.3.0 container_name: opensearch-dashboards ports: - 5601:5601 expose: - "5601" environment: OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]' # must be a string with no spaces when specified as an environment variable logstash: image: opensearchproject/logstash-oss-with-opensearch-output-plugin:7.16.2 container_name: logstash volumes: - ./config/:/usr/share/logstash/pipeline/:ro ports: - 5044:5044 expose: - "5044" environment: LS_JAVA_OPTS: "-Xmx256m -Xms256m" # networks: # - opensearch-net networks: opensearch-net:

6 mai 2022 ยท 1 min

Simple pastebin : Pinnwand

Simple Dockerfile to build pinnwand. https://pinnwand.readthedocs.io/en/latest/index.html FROM alpine RUN apk update && apk add py3-pip gcc python3-dev musl-dev g++ RUN pip3 install pinnwand EXPOSE 9000 CMD pinnwand http --port 9000

7 avril 2022 ยท 1 min

pip_search

Try this : pip3 install pip_search pip_search podman-compose -s released ๐Ÿ https://pypi.org/search/?q=podman-compose ๐Ÿ โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“ โ”ƒ Package โ”ƒ Version โ”ƒ Released โ”ƒ Description โ”ƒ โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ โ”‚ ๐Ÿ“‚ compose-addons โ”‚ 0.2.1 โ”‚ 20-08-2015 โ”‚ Tools to supplement โ”‚ โ”‚ ๐Ÿ“‚ compose-deploy โ”‚ 0.1.5 โ”‚ 13-05-2016 โ”‚ A wrapper around docker-compose to aid in deploying to a remote server. โ”‚ โ”‚ ๐Ÿ“‚ compose_diff โ”‚ 0.4.0 โ”‚ 03-01-2017 โ”‚ diff docker-compose files โ”‚ โ”‚ ๐Ÿ“‚ compose-monitor โ”‚ 1.2.6 โ”‚ 10-07-2017 โ”‚ This utility is designed for monitoring and updating of the services in the specified docker-compose.yml file. โ”‚ โ”‚ ๐Ÿ“‚ compose_format โ”‚ 1.2.0 โ”‚ 12-10-2017 โ”‚ format docker-compose files โ”‚ โ”‚ ๐Ÿ“‚ compose-dump โ”‚ 0.1b4 โ”‚ 27-02-2018 โ”‚ Backup tool for Docker Compose projects โ”‚ โ”‚ ๐Ÿ“‚ compose-paas โ”‚ 1.0.3 โ”‚ 14-05-2018 โ”‚ Deploy to multiple container platforms/PAAS using docker-compose files โ”‚ โ”‚ ๐Ÿ“‚ dockerfile-compose โ”‚ 0.0.3 โ”‚ 16-09-2018 โ”‚ Utils for making dockerfiles from other dockerfiles โ”‚ โ”‚ ๐Ÿ“‚ flask-compose โ”‚ 0.2.0 โ”‚ 27-10-2018 โ”‚ A routing library for flask applications obeying the "Decorator Design Pattern". โ”‚ โ”‚ ๐Ÿ“‚ ansible-compose โ”‚ 1.0.8.post5 โ”‚ 15-02-2019 โ”‚ The obscene docker-compose deploy with ansible cli โ”‚ โ”‚ ๐Ÿ“‚ pandoc-compose โ”‚ 0.0.7 โ”‚ 14-06-2019 โ”‚ Create and run a fully configured pandoc command. โ”‚ โ”‚ ๐Ÿ“‚ jinja-compose โ”‚ 0.0.1 โ”‚ 22-07-2019 โ”‚ docker-compose wrapper with Jinja support โ”‚ โ”‚ ๐Ÿ“‚ compose-watcher โ”‚ 1.2.5 โ”‚ 19-03-2020 โ”‚ compose-watcher โ”‚ โ”‚ ๐Ÿ“‚ compose-cms โ”‚ 1.0.3 โ”‚ 24-07-2020 โ”‚ โ”‚ โ”‚ ๐Ÿ“‚ context-compose โ”‚ 0.0.2 โ”‚ 22-10-2020 โ”‚ Compose context managers from a sequence โ”‚ โ”‚ ๐Ÿ“‚ compose-plantuml โ”‚ 0.2.1 โ”‚ 23-11-2020 โ”‚ converts docker-compose into plantuml โ”‚ โ”‚ ๐Ÿ“‚ gen-compose โ”‚ 1.1.0 โ”‚ 27-11-2020 โ”‚ Key generator for macos keybinding system โ”‚ โ”‚ ๐Ÿ“‚ opod โ”‚ 0.0.1 โ”‚ 24-01-2021 โ”‚ Use opod orchestrate Podman โ”‚ โ”‚ ๐Ÿ“‚ ecs-compose โ”‚ 0.9.92 โ”‚ 25-01-2021 โ”‚ Amazon ECS cli for docker-compose like deployments โ”‚ โ”‚ ๐Ÿ“‚ location-guessing-game-telegram-bot โ”‚ 0.1.1 โ”‚ 14-02-2021 โ”‚ Basic Telegram Bot Sending Random Wikimedia Commons Photos โ”‚ โ”‚ ๐Ÿ“‚ backup-compose โ”‚ 0.0.4 โ”‚ 16-03-2021 โ”‚ Backup/Restore your docker-compose projects โ”‚ โ”‚ ๐Ÿ“‚ neoload-compose โ”‚ 0.1.4 โ”‚ 02-04-2021 โ”‚ A command-line native utility for creating NeoLoad performance tests โ”‚ โ”‚ ๐Ÿ“‚ gada-compose โ”‚ 0.1a0 โ”‚ 07-04-2021 โ”‚ Python frontend for mysql cli โ”‚ โ”‚ ๐Ÿ“‚ compose-flow โ”‚ 3.8.2 โ”‚ 06-05-2021 โ”‚ codified workflows for docker compose โ”‚ โ”‚ ๐Ÿ“‚ docker-compose โ”‚ 1.29.2 == โ”‚ 10-05-2021 โ”‚ Multi-container orchestration for Docker โ”‚ โ”‚ ๐Ÿ“‚ compose-mode โ”‚ 0.6.0 โ”‚ 03-06-2021 โ”‚ A tiny wrapper around docker-compose to easily use multiple sets of config files โ”‚ โ”‚ ๐Ÿ“‚ guacamole-compose โ”‚ 0.1.7 โ”‚ 17-06-2021 โ”‚ Easy deployment of Apache Guacamole. โ”‚ โ”‚ ๐Ÿ“‚ precompose โ”‚ 0.4.0 โ”‚ 09-08-2021 โ”‚ Import a Docker Compose application into ostree โ”‚ โ”‚ ๐Ÿ“‚ connexion-compose โ”‚ 0.3.2 โ”‚ 03-09-2021 โ”‚ Create Connexion schema composed from several files in a nested directory structure. โ”‚ โ”‚ ๐Ÿ“‚ compose.db2 โ”‚ 0.2.0.2 โ”‚ 16-10-2021 โ”‚ compose db2 management library โ”‚ โ”‚ ๐Ÿ“‚ compose โ”‚ 1.2.8 โ”‚ 19-10-2021 โ”‚ The classic ``compose``, with all the Pythonic features. โ”‚ โ”‚ ๐Ÿ“‚ podman-compose โ”‚ 1.0.3 == โ”‚ 21-12-2021 โ”‚ A script to run docker-compose.yml using podman โ”‚ โ”‚ ๐Ÿ“‚ repo2podman โ”‚ 0.1.1 โ”‚ 07-02-2022 โ”‚ Repo2docker Podman extension โ”‚ โ”‚ ๐Ÿ“‚ cloudview โ”‚ 0.3.8 โ”‚ 09-02-2022 โ”‚ View instance information on all supported cloud providers โ”‚ โ”‚ ๐Ÿ“‚ podman โ”‚ 4.0.0 โ”‚ 28-02-2022 โ”‚ Bindings for Podman RESTful API โ”‚ โ”‚ ๐Ÿ“‚ v-podman-compose โ”‚ 1.0.4b1 โ”‚ 23-03-2022 โ”‚ A script to run docker-compose.yml using podman โ”‚ โ”‚ ๐Ÿ“‚ compose-pydantic โ”‚ 0.2.0 โ”‚ 02-04-2022 โ”‚ Parse Compose Specification data using Pydantic โ”‚ โ”‚ ๐Ÿ“‚ thoth-messaging โ”‚ 0.16.1 โ”‚ 05-04-2022 โ”‚ Messaging module of Project Thoth โ”‚ โ”‚ ๐Ÿ“‚ molecule-podman โ”‚ 2.0.0 โ”‚ 08-04-2022 โ”‚ Molecule aids in the development and testing of Ansible roles โ”‚ โ”‚ ๐Ÿ“‚ thoth-storages โ”‚ 0.71.2 โ”‚ 11-04-2022 โ”‚ Storage and database adapters available in project Thoth โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

4 avril 2022 ยท 4 min

La chaรฎne iptables DOCKER-USER

Si on dรฉmarre un container avec : docker run -p 80:80 nginx, docker rajoute une rรจgle dans sa chaรฎne DOCKER-USER de iptables afin de faire son foward. De cette maniรจre, les rรจgles de INPUT ne sont pas utilisรฉes et le filtre entrant ne sโ€™applique pas au service des containers. On joue donc avec DOCKER-USER pour contourner ce problรจme. Par exemple on peut ajouter en derniรจre ligne ร  cette chaรฎne une rรจgle -j DROP -i eth0 et filtrer par la suite. ...

14 janvier 2022 ยท 1 min

Gitlab-runner : DinD

gitlab-runner.yaml : Un truc du genre ร  adapter. [[runners]] name = "Cool" url = "https://cool/" token = "123456789" output_limit = 50000000 executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "docker:stable" privileged = true disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false shm_size = 0

3 novembre 2021 ยท 1 min

SQL: copie simple d'une table

Pour ne plus oublier : insert into new_table (select * from old_table);

4 octobre 2021 ยท 1 min

Apache2 et http2

On peut mettre dans : /etc/apache2/conf.d/http2.conf H2ModernTLSOnly on Protocols h2 h2c http/1.1 /etc/apache2/sites-enable/default-ssl.conf <VirtualHost *:443> ServerName www.example.net ServerAdmin webmaster@localhost H2EarlyHints on DocumentRoot /var/www/ Header always set Strict-Transport-Security "max-age=15552001; includeSubdomains;" LogLevel warn ErrorLog ${APACHE_LOG_DIR}/error_.log CustomLog ${APACHE_LOG_DIR}/access_.log combined SSLEngine on SSLCertificateFile /etc/letsencrypt/live/example.net-0001/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.net-0001/privkey.pem <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options FollowSymLinks MultiViews Options -Indexes AllowOverride None Order allow,deny allow from all </Directory> <Directory /var/www/h/> <FilesMatch "\.html$"> H2PushResource "/h/assets/css/common.css" critical H2PushResource "/h/images/profile.png" critical H2PushResource "/h/theme/pygments/github.min.css" critical H2PushResource "/h/theme/stylesheet/style.min.css" critical </FilesMatch> </Directory> </VirtualHost>

18 fรฉvrier 2019 ยท 1 min

Redirection de 2 millions d'url avec nginx et redis

On a essayรฉ de rediriger 2 millions dโ€™url avec la fonction remaps de nginx. Les redirections occupaient beaucoup de temps CPU et chargaient la mรฉmoire du serveur (1Go). Les temps de rรฉponses รฉtaient trรจs moyens. Une autre solution est possible sans ces inconvรฉnients. On rรฉcupรจre la lib lua sur OpenResty. https://github.com/openresty/lua-resty-redis On le range et on รฉdite nginx.conf pour placer le chemin ci-dessous dans la balise http : lua_package_path "/etc/nginx/lib/redis.lua;;"; On รฉdite la conf du vhost : ...

18 fรฉvrier 2019 ยท 1 min

linkchecker

Pour vรฉrifier les url dโ€™un site et les liens morts. linkchecker est prรฉsent dans les dรฉpรดts de Debian. Il peut รชtre agressifโ€ฆ Attention ร  la charge. Dans les logs on a : X.X.X.X - - [10/Dec/2018:10:10:10 +0100] "GET /fr/tout-pour-les-cadeaux-.html HTTP/1.1" 200 38266 "https://www.wwww.com/fr/evenement/noel/j-envoie-mes-voeux/" "Mozilla/5.0 (compatible; LinkChecker/9.4.0; +http://wummel.github.io/linkchecker/)"

10 dรฉcembre 2018 ยท 1 min