how should I deploy using docker-compose?

Right now I rsync my directory to the server and then run this script on the server:

CURRENT_UID=$(id -u):$(id -g) docker-compose stop CURRENT_UID=$(id -u):$(id -g) docker-compose up --build -d

This causes a 30-60 second downtime for my api. Is there a quicker way to do this without having to manually stop and rebuild?

submitted by /u/chovy
[link] [comments]
Source: Reddit