UNPKG

@ordinarysh/docker-config

Version:

Docker configurations for Next.js applications with multi-stage builds and optimization

57 lines (49 loc) 1.52 kB
/** * Get the path to a Docker template file * @param template - Template name (nextjs, node) * @returns Absolute path to template */ export declare function getDockerfilePath(template: 'nextjs' | 'node'): string /** * Get the content of a Docker template * @param template - Template name (nextjs, node) * @returns Dockerfile content * @throws When template doesn't exist or cannot be read */ export declare function getDockerfileContent( template: 'nextjs' | 'node' ): string /** * Get the path to the .dockerignore template * @returns Absolute path to .dockerignore */ export declare function getDockerIgnorePath(): string /** * Get the content of the .dockerignore template * @returns .dockerignore content * @throws When template cannot be read */ export declare function getDockerIgnoreContent(): string /** * Get the path to a docker-compose template * @param template - Template name (test) * @returns Absolute path to template */ export declare function getDockerComposePath(template?: 'test'): string /** * Get the content of a docker-compose template * @param template - Template name (test) * @returns Docker compose content * @throws When template doesn't exist or cannot be read */ export declare function getDockerComposeContent(template?: 'test'): string /** * Convenience exports for common templates */ export declare const templates: { nextjs: () => string node: () => string dockerignore: () => string dockerCompose: () => string } export default templates