Forcing cURL to get a password from the environment

This bash solution appears to best fit my needs. It’s decently secure, portable, and fast. #!/bin/bash SRV=”example.com” URL=”https://$SRV/path” curl –netrc-file <(cat <<<“machine $SRV login $USER password $PASSWORD”) “$URL” This uses process substitution (<( command ) runs command in a sub-shell to populate a file descriptor to be handed as a “file” to the parent command, … Read more

Docker-Compose Environment-Variables blank string

Although the other answers are both correct they do not highlight the underlying misunderstanding here enough: With the env_file option you can specify a file with variables to be injected into the environment in the container. Using variable substitution in the docker-compose.yml you can access variables in the environment of the docker-compose command, i.e. on … Read more

Using multi-line value in .env file in docker-compose

If you don’t mind not using the .env file (maybe that environment variable is used only in a single container). You can define environment variables directly inside docker-compose.yml and there, you can make full use of YAML formatting options. I.e.: myservice: build: . environment: SSH_KEY: > ——— WHATEVER ———- randomkeybase64thingforyourse rvice ——- END WHATEVER ——– … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)