- Prefer logs to print statements
- Logging objects should be named
logger - Refer to boilerplate(s) below for add'l details
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
| import os | |
| def isdrive(path): | |
| """Return `True` if path is the drive root | |
| Parameters | |
| ---------- | |
| path : path-like | |
| """ | |
| path = os.path.abspath(path) |
GOAL: Keep secrets out of plaintext (esp when syncing dockerfile and docker-compose.yaml to repo)
- Each secret needs to be a single text file with a clear name
- Edit
docker-entrypoint.shto run per environmental variable - (Re)Build docker image with
docker-entrypoint.shas entrypoint - Create
secretsin docker-compose - Call secrets with "_FILE" appended to the name when specifying environmental variable
# generate key
ssh-keygen -t rsa -b 4096 -C "<your_email@example.com>"
# ensure ssh agent is running
eval "$(ssh-agent -s)"
# add key to agent
NewerOlder