docker swarm init --data-path-port=7789 --advertise-addr <ip-addr>
docker network create -d overlay --attachable proxy
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
| services: | |
| # caddy: | |
| # image: docker.arvancloud.ir/caddy:2.8-alpine | |
| # restart: unless-stopped | |
| # command: caddy reverse-proxy --access-log --from https://domain:443 --to http://jumper:6157 | |
| # ports: | |
| # - "80:80" | |
| # - "443:443" | |
| # - "443:443/udp" | |
| # volumes: |
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
| apiVersion: batch/v1 | |
| kind: CronJob | |
| metadata: | |
| name: minio-cleanup | |
| namespace: devops-storage | |
| spec: | |
| schedule: "0 * * * *" | |
| jobTemplate: | |
| spec: | |
| template: |
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
| services: | |
| cadvisor: | |
| container_name: cadvisor | |
| hostname: cadvisor | |
| image: gcr.io/cadvisor/cadvisor:${CADVISOR_VERSION} | |
| restart: unless-stopped | |
| privileged: true | |
| networks: | |
| backend: null # backend communications | |
| caddy_caddynet: null # frontend communications (web UI) |
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
| # This script sets up a MinIO server with a bucket and user, and configures policies for read/write access and public read access. | |
| openssl rand -hex 10 | |
| openssl rand -hex 20 | |
| mc alias set local http://127.0.0.1:9000 f2fc721724d133e6ebeb 62f2c9d238737b3893721fdbfb3147c5571ddb94 | |
| # Create a bucket named 'bucketname' and set a quota of 25GB | |
| mc mb local/bucketname | |
| mc quota set local/bucketname --size 25G | |
| # Create a user named 'bucketuser' with a specific access key and secret key |
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
| services: | |
| caddy: | |
| image: caddy:2.6.4 | |
| restart: unless-stopped | |
| command: caddy reverse-proxy --from https://hc.monkeyseemonkeydo.lv:443 --to http://web:8000 | |
| ports: | |
| - 80:80 | |
| - 443:443 | |
| volumes: | |
| - caddy:/data |
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
| FROM python:3.8-slim-buster | |
| WORKDIR /app | |
| COPY requirements.txt requirements.txt | |
| RUN pip install -r requirements.txt | |
| COPY exporter.py . | |
| CMD ["python", "exporter.py"] |
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
| #cloud-config | |
| # Option 1 - Full installation using cURL | |
| package_update: true | |
| package_upgrade: true | |
| groups: | |
| - docker | |
| system_info: |
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
| #!/bin/bash | |
| set -xue | |
| # Synchronize the system clock with an NTP server | |
| sudo ntpdate pool.ntp.org | |
| # Get the current UTC time | |
| current_utc=$(date -u +"%Y-%m-%d %H:%M:%S") | |
| # Convert the current UTC time to a timestamp |