Skip to content

Instantly share code, notes, and snippets.

View McFateM's full-sized avatar

Mark McFate McFateM

View GitHub Profile
@McFateM
McFateM / Log and acme.json
Last active May 17, 2020 17:44
DGDocker3 Test 2 Log - DNS-01 Challenge with LE Staging
07a950eaaba4bba214d08c6d730146a95061d70912902e706ad81a2bf5690eab
Pulling traefik (traefik:2.2.1)...
2.2.1: Pulling from library/traefik
cbdbe7a5bc2a: Pull complete
f16506d32a25: Pull complete
2be216d464d0: Pull complete
aed51f08b610: Pull complete
Digest: sha256:ad4442a6f88cf35266542588f13ae9984aa058a55a518a87876e48c160d19ee0
Status: Downloaded newer image for traefik:2.2.1
Creating traefik ... done
@McFateM
McFateM / traefik.yml
Created May 17, 2020 17:29
DGDocker3 DNS-01 Challenge with LE Staging
api:
dashboard: true
entryPoints:
http:
address: ":80"
https:
address: ":443"
providers:
@McFateM
McFateM / Log and acme.json
Last active May 17, 2020 17:32
DGDocker3 Test 1 Log - HTTP-01 Challenge with LE Staging
c729c0d0fa2925d13381efd22fad4ce0ef8c3f8866ee6958bff4a429a08d3a4d
Pulling traefik (traefik:2.2.1)...
2.2.1: Pulling from library/traefik
cbdbe7a5bc2a: Pull complete
f16506d32a25: Pull complete
2be216d464d0: Pull complete
aed51f08b610: Pull complete
Digest: sha256:ad4442a6f88cf35266542588f13ae9984aa058a55a518a87876e48c160d19ee0
Status: Downloaded newer image for traefik:2.2.1
Creating traefik ... done
@McFateM
McFateM / traefik.yml
Created May 17, 2020 16:54
DGDocker3 HTTP-01 Challenge with LE Staging
╭─mcfatem@dgdocker3 /opt/containers/traefik/data ‹master*›
╰─$ cat traefik.yml
api:
dashboard: true
entryPoints:
http:
address: ":80"
https:
address: ":443"
@McFateM
McFateM / gist:095eb6cd798f8c9807de7e0c0024cf62
Created May 17, 2020 15:24
Log of First DNS-01 Attempt for Static.Grinnell.edu
Well, this appeared to work in "staging" so I switched over to use the LE live server, and I got no visible errors, so the sites work, but all of the certs are invalid.  8^(
Checking the logs shows this...
╭─administrator@static /opt/docker-traefik-host-with-DNS-01 ‹master*›
╰─$ cat ~/docker-compose.log
Attaching to whoami, traefik_proxy, portainer, watchtower
whoami        | Starting up on port 80
traefik_proxy | time="2020-04-28T19:52:31Z" level=info msg="Using TOML configuration file /traefik.toml"
traefik_proxy | time="2020-04-28T19:52:31Z" level=info msg="Traefik version v1.7.20 built on 2019-12-10_05:02:10PM"
@McFateM
McFateM / server-info Script
Last active January 26, 2021 15:11
The bash script for my "server-info" command
#!/bin/bash
# Modified: Tuesday, January 26, 2021 9:10 AM
#
# This is server-into, formerly 'dynmotd'.
# This script reqiures 'figlet' and 'mdv'
#
# Park this script in /usr/local/bin and give it rwxr-xr-x (755) file protection.
# Create a symbolic link 'ln -s /usr/local/bin/server-info server' in /usr/local/bin if you like.
# Try to get the client IP address (important for debugging remotely in some cases).
@McFateM
McFateM / server-info.md
Last active May 19, 2020 19:20
Template .md file for my "server-info" bash script and command

This is /etc/server-info.md. lifted from server Digital7.

  • Edit this file to include reminders and important information.

Created: Tuesday, March 5, 2020 1:10 PM

Significant History -------------------------------------------------

@McFateM
McFateM / modsviatwig.drush.inc
Created April 17, 2020 21:04
PHP Code for the mods-via-twig Drush Command
<?php
/**
* @file
* Example drush command.
*
* To run this *fun* command, execute `sudo drush --include=./examples mvt`
* from within your drush directory.
*
* See `drush topic docs-commands` for more information about command authoring.
@McFateM
McFateM / gist:6da051df1da4b3613194e34c41b5d65b
Created April 17, 2020 20:37
Executing `drush mods-via-twig`
# Importing the New .xml Using Drush
The whole point of this entire process is to get us back to this point with a set of reviewed and modified _.xml_ files that can be successfully passed to the _drush islandora_datastream_replace_ command. The documentation for that command is presented below.
```
root@122092fe8182:/var/www/html/sites/default/files/DG-Metadata-Review-2020-r1/Ready-to-Process/social-justice# drush islandora_datastream_replace --help
Replaces a datastream in all objects given a file list in a directory.
Examples:
drush -u 1 islandora_datastream_replace Replacing MODS datastream in object.
@McFateM
McFateM / rsync.md
Created April 17, 2020 20:34
MODS-via-Twig File Movement

rsync - Fetch All mods.csv

With the Grinnell College //STORAGE server mounted to iMac MA8660 you can run the following rsync command to fetch all of the latest mods.csv files and directories after they have been created using the Map-MODS-to-MASTER Python 3 script on MA8660...

╭─mark@Marks-Mac-Mini ~/GitHub/lando-d8/sites/default/files/collections ‹8.6.x*›
╰─$ rsync -aruvi --exclude '*.xml' --exclude '*.log' --exclude '*.remainder' --progress markmcfate@132.161.216.145:/Volumes/LIBRARY/ALLSTAFF/DG-Metadata-Review-2020-r1/. ~/GitHub/lando-d8/sites/default/files/collections/.

The command alone is: