npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

compose-deploy

v2.0.53

Published

Docker Compose deployment tool using ssh2

Downloads

5

Readme

compose-deploy

CircleCI

CLI to deploy docker-compose setups to remote servers using ssh

about

Simply deploying a docker-compose setup can be a real struggle. Cloning and pulling the full project on your remote server every time you push some changes can be a real hassle when you're moving fast. Out of this problem, compose-deploy was created. Being a simple tool wrapping existing features of docker-compose and ssh2, it offers a straightforward approach to deploy your Compose files with unprecedented ease.

installation & usage

To install compose-deploy from npm, simply run the following:

npm i -g compose-deploy

After you've downloaded the binary, you can initialize a new deployment project by running

compose-deploy init [directory of choice, optional]

This will create a configuration file named compose-deploy.yml, which contains all configuration options needed for managing deployment workflows and connecting to the remote server.

After you've configured your setup, simply execute compose-deploy [up|deploy], and watch in delight as your application is deployed.

how it works

In the first step, compose-deploy builds and pushes your Docker images needed for running the services defined in your Compose file. This is achieved by executing docker-compose build & docker-compose push. Afterwards, an SSH connection to your deployment targets is established, existing deployments of the same project are found and shut down (without removing persistent data like volumes), the current compose file is uploaded and launched. Simple as that, almost all of the processes described above already exist in docker-compose, making compose-deploy a really simple piece of software alltogether.

faq

Can I use private image registries?

Sure, since the complete process of building and pushing Docker images for your project is done by docker-compose itself, you can configure your docker-compose file like described in the reference example. Don't forget to log in to your registry of choice on the target server though, otherwise you might not be able to pull the built and pushed images.

What about other features of docker-compose? Do I have to access my server every time I want to monitor my deployments?

Currently, there's no other way to access your deployments than by checking manually. However, one of the next updates will add support for using some common docker-compose features like log-viewing & command-execution on your remote without connecting manually, stay tuned for that!

configuration

  • name (string): The name of your deployment project
  • targets (Target[]): A list of deployment targets (servers)
    • All options listed here are supported
    • privateKeyFile can be used to supply the file path of your private key used for SSH auth
  • composeFile: The path of your compose file (defaults to docker-compose.yml in your current working directory)

environment variables

Some SSH connection options are automatically used when present as environment variables, including

  • SSH_AUTH_SOCK: Path to a UNIX socket created by your running ssh-agent (optional)
  • COMPOSE_DEPLOY_SSH_PASSPHRASE, COMPOSE_DEPLOY_SSH_PASSWORD, COMPOSE_DEPLOY_SSH_USER, COMPOSE_DEPLOY_SSH_HOST, COMPOSE_DEPLOY_SSH_PORT: Connection-specific options, which can be supplied and overriden by your configuration

license

This project is licensed under the MIT License.