how add command in docker-compose stack file code example
Example 1: docker swarm deploy
docker stack deploy -c "path to compose" stackname
Example 2: healthcheck docker compose
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s