1

I’m looking to upgrade my app to run with docker-compose rather than using systemd unit files with docker. However my web app uses git so there is no .yml file on my server. Every time I try to build a docker-compose image, my .yml file can’t be found on the server. It returns:

ERROR:
    Can't find a suitable configuration file in this directory or any
    parent. Are you in the right directory?

    Supported filenames: docker-compose.yml, docker-compose.yaml

How can I build a docker-compose image while using a git remote repo?

1 Answer 1

1

You need to generate a docker-compose.yml file (or copy it from an external referential) on your server.

That can be achieve through a post-receive (server-side) hook which can ensure, each time a new commit is pushed that:

  • the docker-compose.yml is still there
  • if not, copy/generate it
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.