1
How should I deploy docker-compose on a remote server using github actions?
Post Body
I'm trying to figure out how to deploy my app with docker compose on a remote ubuntu server, but am having trouble wrapping my head around it (I just learned docker recently)
All of this is facilitated through github actions
My Current Deployment Pattern:
- On pushes to
development
, the actions file will trigger - In this file, it will SSH into my remote ubuntu server
- It will run the following:
- pull some images from dockerhub
- stop rm any running containers
docker run
the images
- Nginx is configured on the server to proxy pass any traffic to the correct ports for the docker containers
With Docker Compose:
- I have switched from just docker to docker compose.
- What should my actions file look like/do?
I was thinking that after SSH-ing into the remote server, it would cd
to the repo, and run the docker compose commands there.
Is there a better way to do this? I'm new to github actions too, so not sure if there is a more complete/robust way to do this.
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 8 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/devops/comm...