Snippet from docker-compose:
secrets:
- source: "docker_secrets_expand"
target: "/docker_secrets_expand.sh"
mode: "0555"
- db_password
environment:
DB_PASSWORD:DOCKER-SECRET->db_password
#!/usr/bin/env bash | |
# netplan2NM.sh | |
# Ubuntu server 20.04 Change from netplan to NetworkManager for all interfaces | |
echo 'Changing netplan to NetowrkManager on all interfaces' | |
# backup existing yaml file | |
cd /etc/netplan | |
cp 00-installer-config.yaml 00-installer-config.yaml.orig |
Snippet from docker-compose:
secrets:
- source: "docker_secrets_expand"
target: "/docker_secrets_expand.sh"
mode: "0555"
- db_password
environment:
DB_PASSWORD:DOCKER-SECRET->db_password
Sample script that allows you to define as environment variables the name of the docker secret that contains the secret value. It will be in charge of analyze all the environment variables searching for the placeholder to substitute the variable value by the secret.
You can define the next environment variables:
# | |
# Proof of concept for a HAProxy maintenance mode | |
# | |
# | |
# Control the maintenance page during runtime using the stats socket: | |
# | |
# To put the whole site in maintenance mode (for all IPs): | |
# > add acl #0 0.0.0.0/0 | |
# | |
# To exclude your own ip, so you are able to test things out: |