name: Deploy to cPanel | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
FTP-Deploy-Action: | |
name: FTP-Deploy-Action | |
runs-on: ubuntu-latest | |
steps: |
import os, uuid | |
from io import BytesIO | |
from datetime import datetime | |
from urllib.parse import urlparse | |
from azure.storage.blob import BlobServiceClient | |
import pandas as pd | |
def azure_upload_df(container=None, dataframe=None, filename=None): | |
""" | |
Upload DataFrame to Azure Blob Storage for given container |
# Common fetches | |
# Match source IP address | |
acl is_malicious src 192.168.10.32 | |
acl is_local_net src 192.168.32.0/24 # match IP range | |
# Match request path | |
acl is_api path -i -m beg /api # match paths starting with /api | |
acl is_image -i -m end .jpg .png .gif # match paths ending with .jpg .png and .gif extensions | |
acl is_health -i path_str /health # exact match path /health |
# Set AWS credentials and S3 paramters | |
AWS_KEY="" | |
AWS_SECRET="" | |
S3_BUCKET="" | |
S3_BUCKET_PATH="/" | |
S3_ACL="x-amz-acl:private" | |
function s3Upload | |
{ | |
path=$1 |
GitLab uses Fog to communicate with various object storage services
when running backups. Fog works with S3 as well as S3-compatible services like Spaces.
The key difference is that you need to explictly set the endpoint
for non-S3 services.
If you are using the "ominbus" GitLab packages, you would need to add the following
to /etc/gitlab/gitlab.rb
:
gitlab_rails['backup_upload_connection'] = {
See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.json
file in/etc/docker
:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
Find the original here article here: Devops Best Practices
DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing