5

What I want to do: Deploy docker-compose solution from Github to my virtual private server which has docker and docker-compose installed.

I saw that there are Github Actions that allow me to copy files over SSH after push to master, but I don't know how to run docker-compose up on my server after source has been copied.

On my VPS I have Ubuntu 18.4 installed.

0

1 Answer 1

10
+50

I believe Github actions also allow you to run arbitrary commands on remote servers via ssh (there are a few in their library).

Assuming you copy your docker-compose.yml into, /home/user/app/docker-compose.yml, you could run a command like so:

ssh [email protected] "cd /home/user/app/ && docker-compose up -d"
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.