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

@defang-io/pulumi-defang

v0.17.1

Published

Pulumi provider for the Defang Opinionated Platform

Downloads

323

Readme

pulumi-defang

Typescript Pulumi provider for the Defang Opinionated Platform.

This Dynamic Resource Provider allows you to manage your container services on the Defang Opinionated Platform. It was modelled after the Compose Spec.

Install

The provider is available from NPM Package Registry. See installation instructions.

npm i @defang-io/pulumi-defang

Example

import { DefangService } from "@defang-io/pulumi-defang/lib";

const service = new DefangService("defang-demo", {
  // name: "…",                             // defaults to the Pulumi resource name
  // image: "nginx:latest",                 // use a pre-built container image, or
  build: {                                  // build from source
    context: ".",
    dockerfile: "Dockerfile.dev",
  },
  ports: [{ target: 80, protocol: "http", mode: "ingress" }],
  // fabricDNS: "…",                        // override the Defang Fabric Controller endpoint
  // platform: "…",                         // "linux/arm64" | "linux/amd64" | "linux" (default)
  // environment: {
  //   RDS_HOST: "rds.endpoint",
  // },
  // deploy: {
  //   replicas: 1,
  //   resources: {
  //     reservations: { cpus: 0.5, memory: 512 },
  //   },
  // },
  // healthcheck: {
  //   test: ["CMD", "curl", "-f", "http://localhost:80/"], // for Alpine-based images use ["CMD", "wget", "-q", "-O-", …]
  //   interval: 30,
  //   timeout: 10,
  //   retries: 3,
  // },
});

export const fqdn = service.publicFqdn;     // the final FQDN for your service
export const natIPs = service.natIPs;       // the public NAT IPs of the service
export const fabricDNS = service.fabricDNS;

Environment Variables

  • DEFANG_ACCESS_TOKEN - your access token; defaults to the token file from the CLI
  • DEFANG_FABRIC - override the Defang Fabric service endpoint; defaults to prod
  • DEFANG_FORCE_UP - set this to 1 or true to force an update (for debugging only)
  • DEFANG_DEBUG - set this to 1 or true to enable debug logging
  • SOURCE_DATE_EPOCH - the modification time for the files in the build context; defaults to 315532800 (1980-01-01 00:00:00 UTC)

Contributing

Release a New Version

To release a new version, let NPM update the version number in package.json. The CI/CD pipeline will then publish the new version to the NPM registry.

npm version patch
git push