if [ "$SERVER" = "1" ]; then
export CERTIFICATO=certificatesresolvers.leresolver.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory
elif [ "$SERVER" = "2" ]; then
export CERTIFICATO=
else
echo "Scelta effettuata non corretta!"
fi
I am wondering what answer do you expect. Note that if you donāt share enough information you have much less chance to get any reaction. I donāt see any compiling or using the compose command, and you didnāt share any error messages or what you expected and what happened instead so I didnāt really understand the question first. While I was writing the reply I looked at your code so long I realized what you probably want to achieve.
You can use custom compose files (Check docker compose --help for details) and by default you can have docker-compose.yml and docker-compose.override.yml automatically detected by compose. In case of Compose v2, you can also have compose.yml and probably compose.override.yml.
Regarding your shell script, as I mentioned I canāt see any compose command so I donāt know if that is executed in the same script or you just run the shell script and after that you run the compose command in the same shell. In that case you need to source the script and not just execute it.
The question is simple, the solution very complex. The problem is the blank line. I donāt know how to write a comment in bash code.
With bash code I can write this:
Case 1 - --certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json
Case 2 - --
but I canāt write this:
Case 1 - --certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json
Case 2 #- --certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json
I need a strategy to clear the row when in production.
This piece of code is wrong: - --
Happy Christmas @rimelek !