UNPKG

@platypus-stack/platypus-infra-tools

Version:

Tools & utils to manage infrastructure aspects of platypus projects

47 lines (42 loc) 2.15 kB
declare const isDockerRunning: () => boolean; /** solves problem with internal https routing * https://github.com/flexguse/traefik-inter-container-routing * https://stackoverflow.com/questions/68022116/how-to-request-to-api-server-from-frontend-app-between-docker-containers * https://stackoverflow.com/questions/46446541/traefik-https-access-between-applications-does-not-work */ declare function getDockerNetworkGatewayIP(dockerNetwork: string): Promise<string>; /** * Gets array of docker container attached to docker network */ declare function getDockerNetworkContainers(dockerNetwork: string): Promise<string[]>; /** * checks if docker network with given name exists */ declare function isDockerNetworkExisting(dockerNetwork: string): Promise<boolean>; interface IStartPlatypusProject { /** name of the docker network to create */ dockerNetworkName: string; /** absolute path to the docker-compose file */ dockerComposePath: string; /** whether to pull the images before starting the containers */ pull?: boolean; /** path to the project directory */ projectDirectory?: string; /** additional args to docker compose command like --env-file */ additionalArgs?: string; } declare function startPlatypusProject({ dockerNetworkName, dockerComposePath, pull, projectDirectory, additionalArgs, }: IStartPlatypusProject): Promise<void>; interface IStopPlatypusProject { /** name of the docker network to create */ dockerNetworkName: string; /** absolute path to the docker-compose file */ dockerComposePath: string; /** path to the project directory */ projectDirectory?: string; /** additional args to docker compose command like --env-file */ additionalArgs?: string; /** whether to remove orphan containers */ removeOrphans?: boolean; } declare const stopPlatypusProject: ({ dockerComposePath, dockerNetworkName, projectDirectory, additionalArgs, removeOrphans, }: IStopPlatypusProject) => Promise<void>; export { getDockerNetworkContainers, getDockerNetworkGatewayIP, isDockerNetworkExisting, isDockerRunning, startPlatypusProject, stopPlatypusProject };