Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's Encrypt / Nginx scripts expect obsolete "docker-compose" command #230

Closed
ekansa opened this issue Jun 8, 2023 · 0 comments · Fixed by #233
Closed

Let's Encrypt / Nginx scripts expect obsolete "docker-compose" command #230

ekansa opened this issue Jun 8, 2023 · 0 comments · Fixed by #233
Assignees
Labels
bug Something isn't working

Comments

@ekansa
Copy link

ekansa commented Jun 8, 2023

Description
Like many people on the forum, I ran into problems with Let's Encrypt + Nginx configurations. I think part of the problem may center on changes to Docker compose. The command to invoke docker compose went from docker-compose to docker compose

For example:

myname@kobo:~/kobo-install$ which docker-compose
myname@kobo:~/kobo-install$ which docker compose
/usr/bin/docker

The docker DASH compose (docker-compose) seems expected here: https://github.com/kobotoolbox/kobo-install/blob/master/templates/nginx-certbot/init-letsencrypt.sh.tpl#LL12C38-L12C38

Because which docker-compose returns a null result, the init-letsencrypt.sh fails to actually execute any docker compose related command.

As a workaround, I added a script to my server that mimics the old docker-compose command (see: https://stackoverflow.com/questions/72099653/how-to-alias-docker-compose-to-docker-compose/72187587#72187587), and that seems to have resolved the problems with HTTPS / Let's Encrypt in the setup!

I suggest modifying the init-letsencrypt.sh.tpl so that it can check not just for the old form of the docker-compose command, but also the new form of the command, docker compose (without the dash)

  • OS: Ubuntu 22.04 LTS
  • Docker Compose Version: Docker Compose version v2.18.1

Additional context
I was trying to diagnose why I got these errors:

init-letsencrypt.sh: line 34: run: command not found
init-letsencrypt.sh: line 43: up: command not found
init-letsencrypt.sh: line 47: run: command not found
init-letsencrypt.sh: line 70: run: command not found
init-letsencrypt.sh: line 81: exec: nginx_ssl_proxy: not found
@noliveleger noliveleger added the bug Something isn't working label Aug 16, 2023
@noliveleger noliveleger self-assigned this Aug 16, 2023
@noliveleger noliveleger linked a pull request Sep 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants