├── .gitignore ├── .dockerignore ├── test ├── base │ ├── windows │ │ ├── prisma │ │ │ ├── .keep │ │ │ └── schema.prisma │ │ ├── app │ │ │ ├── tailwind.css │ │ │ ├── root.tsx │ │ │ └── session.server.ts │ │ ├── .dockerignore │ │ ├── tsconfig.json │ │ ├── docker-entrypoint.js │ │ ├── Dockerfile │ │ └── package.json │ ├── litestream-url │ │ ├── prisma │ │ │ ├── migrations │ │ │ │ └── .keep │ │ │ └── schema.prisma │ │ ├── .dockerignore │ │ ├── fly.toml │ │ ├── litestream.yml │ │ ├── package.json │ │ ├── docker-entrypoint.js │ │ └── Dockerfile │ ├── litestream │ │ ├── prisma │ │ │ ├── migrations │ │ │ │ └── .keep │ │ │ └── schema.prisma │ │ ├── .dockerignore │ │ ├── fly.toml │ │ ├── litestream.yml │ │ ├── package.json │ │ ├── docker-entrypoint.js │ │ └── Dockerfile │ ├── instructions │ │ ├── setup.base │ │ ├── setup.build │ │ ├── setup.deploy │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── alpine │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── build │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── bun │ │ ├── .dockerignore │ │ ├── package.json │ │ ├── Dockerfile │ │ └── bun.lock │ ├── defer-build │ │ ├── app │ │ │ ├── tailwind.css │ │ │ ├── root.tsx │ │ │ └── session.server.ts │ │ ├── .dockerignore │ │ ├── package.json │ │ ├── tsconfig.json │ │ ├── prisma │ │ │ └── schema.prisma │ │ ├── docker-entrypoint.js │ │ └── Dockerfile │ ├── dev │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── git │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── litefs │ │ ├── .dockerignore │ │ ├── fly.toml │ │ ├── package.json │ │ ├── Dockerfile │ │ └── litefs.yml │ ├── nginx │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── port │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── swap │ │ ├── .dockerignore │ │ ├── package.json │ │ ├── docker-entrypoint.js │ │ └── Dockerfile │ ├── cache-bun │ │ ├── .dockerignore │ │ ├── bun.lockb │ │ ├── package.json │ │ └── Dockerfile │ ├── cache-npm │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── cache-pnpm │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── cache-yarn │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── distroless │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── envargs │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── no-link │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── packages │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── puppeteer │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── version │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── build-secret │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── cmd-entrypoint │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── fluent-ffmpeg │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── ignore-scripts │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ └── legacy-peer-deps │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile ├── frameworks │ ├── next-npm │ │ ├── pages │ │ │ └── .keep │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── next-pnpm │ │ ├── pages │ │ │ └── .keep │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── next-yarn │ │ ├── pages │ │ │ └── .keep │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── next-yarn4 │ │ ├── pages │ │ │ └── .keep │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── vite │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── remix-pnpm │ │ ├── routes │ │ │ └── .keep │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── remix-blues │ │ ├── prisma │ │ │ ├── migrations │ │ │ │ └── .keep │ │ │ └── schema.prisma │ │ ├── app │ │ │ ├── tailwind.css │ │ │ ├── root.tsx │ │ │ └── session.server.ts │ │ ├── .dockerignore │ │ ├── fly.toml │ │ ├── tsconfig.json │ │ ├── Dockerfile │ │ └── package.json │ ├── remix-indie │ │ ├── prisma │ │ │ ├── migrations │ │ │ │ └── .keep │ │ │ └── schema.prisma │ │ ├── app │ │ │ ├── tailwind.css │ │ │ ├── root.tsx │ │ │ └── session.server.ts │ │ ├── .dockerignore │ │ ├── fly.toml │ │ ├── tsconfig.json │ │ ├── docker-entrypoint.js │ │ ├── Dockerfile │ │ └── package.json │ ├── meteor │ │ ├── .meteor │ │ │ └── release │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── nest │ │ ├── .dockerignore │ │ ├── tsconfig.json │ │ ├── Dockerfile │ │ └── package.json │ ├── nuxt │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── adonisjs │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ └── package.json │ ├── express │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── fastify │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── gatsby │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ ├── next-trpc │ │ ├── .dockerignore │ │ ├── prisma │ │ │ └── schema.prisma │ │ ├── package.json │ │ └── Dockerfile │ ├── svelte-bun │ │ ├── .dockerignore │ │ ├── bun.lockb │ │ ├── package.json │ │ ├── Dockerfile │ │ └── node_modules │ │ │ └── .bin │ │ │ └── vite │ ├── nuxt-prisma │ │ ├── .dockerignore │ │ ├── prisma │ │ │ ├── schema.prisma │ │ │ └── seed.js │ │ ├── package.json │ │ ├── docker-entrypoint.js │ │ └── Dockerfile │ ├── remix-epic │ │ ├── .dockerignore │ │ ├── tsconfig.json │ │ ├── docker-entrypoint.js │ │ ├── Dockerfile │ │ └── package.json │ ├── next-standalone │ │ ├── next.config.mjs │ │ ├── .dockerignore │ │ ├── package.json │ │ ├── docker-entrypoint.js │ │ └── Dockerfile │ ├── svelte-prisma │ │ ├── .dockerignore │ │ ├── prisma │ │ │ ├── schema.prisma │ │ │ └── seed.ts │ │ ├── docker-entrypoint.js │ │ ├── package.json │ │ └── Dockerfile │ ├── astro-ssr │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile │ └── astro-static │ │ ├── .dockerignore │ │ ├── package.json │ │ └── Dockerfile ├── fly │ └── sqlite3 │ │ ├── .dockerignore │ │ ├── fly.toml │ │ ├── package.json │ │ └── Dockerfile └── test.js ├── bun.lockb ├── templates ├── .dockerignore.ejs ├── litestream.yml.ejs └── litefs.yml.ejs ├── .eslintrc.cjs ├── package.json └── .github └── workflows └── ci.yml /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /test/base/windows/prisma/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/frameworks/next-npm/pages/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/frameworks/next-pnpm/pages/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn/pages/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn4/pages/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/frameworks/vite/.dockerignore: -------------------------------------------------------------------------------- 1 | dist -------------------------------------------------------------------------------- /test/frameworks/remix-pnpm/routes/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/base/litestream-url/prisma/migrations/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/base/litestream/prisma/migrations/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/frameworks/remix-blues/prisma/migrations/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/frameworks/remix-indie/prisma/migrations/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/base/instructions/setup.base: -------------------------------------------------------------------------------- 1 | # base additions 2 | -------------------------------------------------------------------------------- /test/base/instructions/setup.build: -------------------------------------------------------------------------------- 1 | # build additions 2 | -------------------------------------------------------------------------------- /test/base/instructions/setup.deploy: -------------------------------------------------------------------------------- 1 | # deploy additions 2 | -------------------------------------------------------------------------------- /test/frameworks/meteor/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@3.0-rc.4 2 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fly-apps/dockerfile-node/HEAD/bun.lockb -------------------------------------------------------------------------------- /test/base/windows/app/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /test/base/alpine/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/build/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/bun/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/defer-build/app/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /test/base/dev/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/git/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/litefs/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/nginx/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/port/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/swap/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/fly/sqlite3/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/remix-pnpm/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | /.cache 4 | /build 5 | /public/build 6 | .env 7 | -------------------------------------------------------------------------------- /test/base/cache-bun/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/cache-bun/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fly-apps/dockerfile-node/HEAD/test/base/cache-bun/bun.lockb -------------------------------------------------------------------------------- /test/base/cache-npm/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/cache-pnpm/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/cache-yarn/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/distroless/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/envargs/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/git/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "github:expressjs/express" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/base/litestream/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/no-link/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/packages/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/puppeteer/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/version/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/nest/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/nuxt/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/remix-blues/app/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /test/frameworks/remix-indie/app/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /test/base/build-secret/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/cmd-entrypoint/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/fluent-ffmpeg/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/ignore-scripts/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/instructions/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/legacy-peer-deps/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/base/litestream-url/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/adonisjs/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/express/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/fastify/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/gatsby/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/next-npm/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/next-pnpm/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/next-trpc/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn4/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/svelte-bun/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | -------------------------------------------------------------------------------- /test/frameworks/meteor/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | .meteor/local -------------------------------------------------------------------------------- /test/frameworks/svelte-bun/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fly-apps/dockerfile-node/HEAD/test/frameworks/svelte-bun/bun.lockb -------------------------------------------------------------------------------- /test/frameworks/nuxt-prisma/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | 8 | dev.db 9 | prisma/dev.db 10 | -------------------------------------------------------------------------------- /test/base/windows/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | 8 | /.cache 9 | /build 10 | /public/build 11 | -------------------------------------------------------------------------------- /test/base/defer-build/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | 8 | /.cache 9 | /build 10 | /public/build 11 | -------------------------------------------------------------------------------- /test/frameworks/remix-blues/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | 8 | /.cache 9 | /build 10 | /public/build 11 | -------------------------------------------------------------------------------- /test/frameworks/remix-epic/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | 8 | /.cache 9 | /build 10 | /public/build 11 | -------------------------------------------------------------------------------- /test/frameworks/remix-indie/.dockerignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | 8 | /.cache 9 | /build 10 | /public/build 11 | -------------------------------------------------------------------------------- /test/frameworks/next-standalone/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | output: "standalone" 4 | }; 5 | 6 | export default nextConfig; 7 | -------------------------------------------------------------------------------- /test/base/litefs/fly.toml: -------------------------------------------------------------------------------- 1 | 2 | [mounts] 3 | source = "data" 4 | destination="/data" 5 | auto_extend_size_threshold = 80 6 | auto_extend_size_increment = "1GB" 7 | auto_extend_size_limit = "10GB" 8 | -------------------------------------------------------------------------------- /test/fly/sqlite3/fly.toml: -------------------------------------------------------------------------------- 1 | 2 | [mounts] 3 | source = "data" 4 | destination="/data" 5 | auto_extend_size_threshold = 80 6 | auto_extend_size_increment = "1GB" 7 | auto_extend_size_limit = "10GB" 8 | -------------------------------------------------------------------------------- /test/base/litestream/fly.toml: -------------------------------------------------------------------------------- 1 | 2 | [mounts] 3 | source = "data" 4 | destination="/data" 5 | auto_extend_size_threshold = 80 6 | auto_extend_size_increment = "1GB" 7 | auto_extend_size_limit = "10GB" 8 | -------------------------------------------------------------------------------- /test/base/litestream-url/fly.toml: -------------------------------------------------------------------------------- 1 | 2 | [mounts] 3 | source = "data" 4 | destination="/data" 5 | auto_extend_size_threshold = 80 6 | auto_extend_size_increment = "1GB" 7 | auto_extend_size_limit = "10GB" 8 | -------------------------------------------------------------------------------- /test/frameworks/svelte-prisma/.dockerignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | 11 | # sqlite3 database 12 | dev.db 13 | prisma/dev.db 14 | -------------------------------------------------------------------------------- /test/base/bun/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bunserver", 3 | "module": "index.ts", 4 | "type": "module", 5 | "devDependencies": { 6 | "bun-types": "latest" 7 | }, 8 | "peerDependencies": { 9 | "typescript": "^5.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/fly/sqlite3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "dependencies": { 9 | "express": "^4.18.2", 10 | "sqlite3": "^5.1.6" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/base/litefs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "dependencies": { 9 | "express": "^4.18.2", 10 | "sqlite3": "^5.1.6" 11 | }, 12 | "dockerfile": { 13 | "litefs": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/frameworks/astro-ssr/.dockerignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | 4 | # generated types 5 | .astro/ 6 | 7 | # dependencies 8 | node_modules/ 9 | 10 | # logs 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /test/frameworks/astro-static/.dockerignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | 4 | # generated types 5 | .astro/ 6 | 7 | # dependencies 8 | node_modules/ 9 | 10 | # logs 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /test/frameworks/remix-blues/fly.toml: -------------------------------------------------------------------------------- 1 | 2 | swap_size_mb = 512 3 | 4 | [[http_service.checks]] 5 | grace_period = "10s" 6 | interval = "30s" 7 | method = "GET" 8 | timeout = "5s" 9 | path = "/healthcheck" 10 | 11 | [deploy] 12 | release_command = "npx prisma migrate deploy" 13 | seed_command = "ts-node --require tsconfig-paths/register prisma/seed.ts" 14 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn4/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yarn4", 3 | "packageManager": "yarn@4.5.3", 4 | "scripts": { 5 | "dev": "next dev", 6 | "build": "next build", 7 | "start": "next start", 8 | "lint": "next lint" 9 | }, 10 | "dependencies": { 11 | "next": "latest", 12 | "react": "latest", 13 | "react-dom": "latest" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/frameworks/nuxt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt-app", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "nuxt dev", 7 | "build": "nuxt build", 8 | "generate": "nuxt generate" 9 | }, 10 | "dependencies": { 11 | "nuxt": "^3.16.1" 12 | }, 13 | "packageManager": "yarn@1.22.21", 14 | "devDependencies": {} 15 | } 16 | -------------------------------------------------------------------------------- /templates/.dockerignore.ejs: -------------------------------------------------------------------------------- 1 | /.git 2 | /node_modules 3 | .dockerignore 4 | .env 5 | Dockerfile 6 | fly.toml 7 | <% if (remix) { -%> 8 | 9 | /.cache 10 | /build 11 | /public/build 12 | <% } -%> 13 | <% if (meteor) { -%> 14 | 15 | /.meteor/local 16 | <% } -%> 17 | <% if (prismaFile) { -%> 18 | 19 | <%= path.join(prismaFile) %> 20 | <%= path.join("prisma", prismaFile) %> 21 | <% } -%> -------------------------------------------------------------------------------- /test/base/dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "dev": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/base/cache-bun/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "cache": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/base/cache-npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "cache": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/base/cache-pnpm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "cache": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/base/cache-yarn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "cache": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/base/build/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "tcs": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "build": "npm run tsc" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/frameworks/express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "^1.4.6", 10 | "debug": "^2.6.9", 11 | "express": "^4.18.2", 12 | "http-errors": "^1.8.1", 13 | "jade": "^1.11.0", 14 | "morgan": "^1.10.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('eslint').Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | env: { 5 | browser: true, 6 | es2021: true, 7 | mocha: true, 8 | }, 9 | extends: ['standard'], 10 | parserOptions: { 11 | ecmaVersion: 'latest', 12 | sourceType: 'module', 13 | }, 14 | rules: { 15 | 'space-before-function-paren': ['error', 'never'], 16 | }, 17 | } -------------------------------------------------------------------------------- /test/frameworks/remix-indie/fly.toml: -------------------------------------------------------------------------------- 1 | 2 | [mounts] 3 | source = "data" 4 | destination="/data" 5 | auto_extend_size_threshold = 80 6 | auto_extend_size_increment = "1GB" 7 | auto_extend_size_limit = "10GB" 8 | 9 | swap_size_mb = 512 10 | 11 | [[http_service.checks]] 12 | grace_period = "10s" 13 | interval = "30s" 14 | method = "GET" 15 | timeout = "5s" 16 | path = "/healthcheck" 17 | -------------------------------------------------------------------------------- /test/base/puppeteer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "^1.4.6", 10 | "debug": "^2.6.9", 11 | "express": "^4.18.2", 12 | "http-errors": "^1.8.1", 13 | "jade": "^1.11.0", 14 | "morgan": "^1.10.0", 15 | "puppeteer": "^21.1.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/base/build-secret/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "secrets": [ 16 | "DATABASE_URL" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/base/fluent-ffmpeg/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "^1.4.6", 10 | "debug": "^2.6.9", 11 | "express": "^4.18.2", 12 | "fluent-ffmpeg": "^2.1.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/frameworks/astro-static/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fly-astro", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro check && astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/check": "^0.5.1", 14 | "astro": "^4.3.5", 15 | "typescript": "^5.3.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/base/litestream/litestream.yml: -------------------------------------------------------------------------------- 1 | # This is the configuration file for litestream. 2 | # 3 | # For more details, see: https://litestream.io/reference/config/ 4 | # 5 | dbs: 6 | - path: /data/dev.db 7 | replicas: 8 | - type: s3 9 | endpoint: $AWS_ENDPOINT_URL_S3 10 | bucket: $BUCKET_NAME 11 | path: litestream/dev.db 12 | access-key-id: $AWS_ACCESS_KEY_ID 13 | secret-access-key: $AWS_SECRET_ACCESS_KEY 14 | -------------------------------------------------------------------------------- /test/base/litestream-url/litestream.yml: -------------------------------------------------------------------------------- 1 | # This is the configuration file for litestream. 2 | # 3 | # For more details, see: https://litestream.io/reference/config/ 4 | # 5 | dbs: 6 | - path: /data/dev.db 7 | replicas: 8 | - type: s3 9 | endpoint: $AWS_ENDPOINT_URL_S3 10 | bucket: $BUCKET_NAME 11 | path: litestream/dev.db 12 | access-key-id: $AWS_ACCESS_KEY_ID 13 | secret-access-key: $AWS_SECRET_ACCESS_KEY 14 | -------------------------------------------------------------------------------- /test/base/port/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "chalk": "^5.3.0", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "^2.6.9", 12 | "express": "^4.18.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "dockerfile": { 18 | "port": 4567 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/base/version/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "chalk": "^5.3.0", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "^2.6.9", 12 | "express": "^4.18.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "engines": { 18 | "node": ">99" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/base/alpine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "chalk": "^5.3.0", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "^2.6.9", 12 | "express": "^4.18.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "dockerfile": { 18 | "alpine": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/base/no-link/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "chalk": "^5.3.0", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "^2.6.9", 12 | "express": "^4.18.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "dockerfile": { 18 | "link": false 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/base/swap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "chalk": "^5.3.0", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "^2.6.9", 12 | "express": "^4.18.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "dockerfile": { 18 | "swap": "512M" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/base/distroless/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "chalk": "^5.3.0", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "^2.6.9", 12 | "express": "^4.18.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "dockerfile": { 18 | "distroless": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/base/nginx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "^1.4.6", 10 | "debug": "^2.6.9", 11 | "express": "^4.18.2", 12 | "http-errors": "^1.8.1", 13 | "foreman": "^3.0.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "dockerfile": { 18 | "nginxRoot": "public" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/frameworks/astro-ssr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fly-astro", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro check && astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/check": "^0.5.1", 14 | "@astrojs/node": "^8.2.0", 15 | "astro": "^4.3.5", 16 | "typescript": "^5.3.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /templates/litestream.yml.ejs: -------------------------------------------------------------------------------- 1 | # This is the configuration file for litestream. 2 | # 3 | # For more details, see: https://litestream.io/reference/config/ 4 | # 5 | dbs: 6 | - path: /data/<%= path.basename(prismaFile) %> 7 | replicas: 8 | - type: s3 9 | endpoint: $AWS_ENDPOINT_URL_S3 10 | bucket: $BUCKET_NAME 11 | path: litestream/<%= path.basename(prismaFile) %> 12 | access-key-id: $AWS_ACCESS_KEY_ID 13 | secret-access-key: $AWS_SECRET_ACCESS_KEY 14 | -------------------------------------------------------------------------------- /test/base/instructions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "instructions": { 16 | "base": "setup.base", 17 | "build": "setup.build", 18 | "deploy": "setup.deploy" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/base/cmd-entrypoint/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "chalk": "^5.3.0", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "^2.6.9", 12 | "express": "^4.18.2", 13 | "http-errors": "^1.8.1", 14 | "jade": "^1.11.0", 15 | "morgan": "^1.10.0" 16 | }, 17 | "dockerfile": { 18 | "cmd": "./bin/www", 19 | "entrypoint": "node" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/base/litestream/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "dependencies": { 9 | "@prisma/client": "5.22.0", 10 | "express": "^4.18.2" 11 | }, 12 | "devDependencies": { 13 | "@types/node": "22.10.2", 14 | "@types/react": "18.3.18", 15 | "@types/react-dom": "18.3.5", 16 | "prisma": "5.22.0", 17 | "ts-node": "10.9.2", 18 | "typescript": "5.7.2" 19 | }, 20 | "dockerfile": { 21 | "litestream": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/base/packages/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "packages": { 16 | "base": [ 17 | "procps" 18 | ], 19 | "build": [ 20 | "libicu-dev" 21 | ], 22 | "deploy": [ 23 | "vim" 24 | ] 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/base/litestream-url/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "dependencies": { 10 | "@prisma/client": "5.22.0", 11 | "express": "^4.18.2" 12 | }, 13 | "devDependencies": { 14 | "@types/node": "22.10.2", 15 | "@types/react": "18.3.18", 16 | "@types/react-dom": "18.3.5", 17 | "prisma": "5.22.0", 18 | "ts-node": "10.9.2", 19 | "typescript": "5.7.2" 20 | }, 21 | "dockerfile": { 22 | "litestream": true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/frameworks/next-standalone/.dockerignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /test/frameworks/gatsby/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-gatsby-site", 3 | "version": "1.0.0", 4 | "private": true, 5 | "description": "my-gatsby-site", 6 | "author": "Sam Ruby", 7 | "keywords": [ 8 | "gatsby" 9 | ], 10 | "scripts": { 11 | "develop": "gatsby develop", 12 | "start": "gatsby develop", 13 | "build": "gatsby build", 14 | "serve": "gatsby serve", 15 | "clean": "gatsby clean" 16 | }, 17 | "dependencies": { 18 | "gatsby": "^5.11.0", 19 | "react": "^18.2.0", 20 | "react-dom": "^18.2.0" 21 | }, 22 | "dockerfile": { 23 | "legacyPeerDeps": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/frameworks/nest/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "removeComments": true, 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "allowSyntheticDefaultImports": true, 9 | "target": "es2017", 10 | "sourceMap": true, 11 | "outDir": "./dist", 12 | "baseUrl": "./", 13 | "incremental": true, 14 | "skipLibCheck": true, 15 | "strictNullChecks": false, 16 | "noImplicitAny": false, 17 | "strictBindCallApply": false, 18 | "forceConsistentCasingInFileNames": false, 19 | "noFallthroughCasesInSwitch": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/frameworks/next-npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@types/node": "^20.5.1", 13 | "@types/react": "^18.2.20", 14 | "@types/react-dom": "^18.2.7", 15 | "autoprefixer": "^10.4.15", 16 | "eslint": "^8.47.0", 17 | "eslint-config-next": "^13.4.19", 18 | "next": "^13.5.6", 19 | "postcss": "^8.4.28", 20 | "react": "^18.2.0", 21 | "react-dom": "^18.2.0", 22 | "tailwindcss": "^3.3.3", 23 | "typescript": "^5.1.6" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/frameworks/next-pnpm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@types/node": "^20.5.1", 13 | "@types/react": "^18.2.20", 14 | "@types/react-dom": "^18.2.7", 15 | "autoprefixer": "^10.4.15", 16 | "eslint": "^8.47.0", 17 | "eslint-config-next": "^13.4.19", 18 | "next": "^13.4.19", 19 | "postcss": "^8.4.31", 20 | "react": "^18.2.0", 21 | "react-dom": "^18.2.0", 22 | "tailwindcss": "^3.3.3", 23 | "typescript": "^5.1.6" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@types/node": "^20.5.1", 13 | "@types/react": "^18.2.20", 14 | "@types/react-dom": "^18.2.7", 15 | "autoprefixer": "^10.4.15", 16 | "eslint": "^8.47.0", 17 | "eslint-config-next": "^13.4.19", 18 | "next": "^13.4.19", 19 | "postcss": "^8.4.31", 20 | "react": "^18.2.0", 21 | "react-dom": "^18.2.0", 22 | "tailwindcss": "^3.3.3", 23 | "typescript": "^5.1.6" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/base/litestream/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | generator client { 2 | provider = "prisma-client-js" 3 | } 4 | 5 | datasource db { 6 | provider = "sqlite" 7 | url = "file:./dev.db" 8 | } 9 | 10 | model User { 11 | id Int @id @default(autoincrement()) 12 | email String @unique 13 | name String? 14 | posts Post[] 15 | } 16 | 17 | model Post { 18 | id Int @id @default(autoincrement()) 19 | createdAt DateTime @default(now()) 20 | updatedAt DateTime @updatedAt 21 | title String 22 | content String? 23 | published Boolean @default(false) 24 | viewCount Int @default(0) 25 | author User? @relation(fields: [authorId], references: [id]) 26 | authorId Int? 27 | } 28 | -------------------------------------------------------------------------------- /test/frameworks/meteor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run", 6 | "test": "meteor test --once --driver-package meteortesting:mocha", 7 | "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha", 8 | "visualize": "meteor --production --extra-packages bundle-visualizer" 9 | }, 10 | "dependencies": { 11 | "@babel/runtime": "^7.23.5", 12 | "meteor-node-stubs": "^1.2.7" 13 | }, 14 | "meteor": { 15 | "mainModule": { 16 | "client": "client/main.js", 17 | "server": "server/main.js" 18 | }, 19 | "testModule": "tests/main.js" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/frameworks/next-standalone/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "standalone-next-js-test", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "next": "14.2.1", 13 | "react": "^18", 14 | "react-dom": "^18" 15 | }, 16 | "devDependencies": { 17 | "@flydotio/dockerfile": "^0.5.5", 18 | "@types/node": "^20", 19 | "@types/react": "^18", 20 | "@types/react-dom": "^18", 21 | "eslint": "^8", 22 | "eslint-config-next": "14.2.1", 23 | "postcss": "^8", 24 | "tailwindcss": "^3.4.1", 25 | "typescript": "^5" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/base/litestream-url/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | generator client { 2 | provider = "prisma-client-js" 3 | } 4 | 5 | datasource db { 6 | provider = "sqlite" 7 | url = env("DATABASE_URL") 8 | } 9 | 10 | model User { 11 | id Int @id @default(autoincrement()) 12 | email String @unique 13 | name String? 14 | posts Post[] 15 | } 16 | 17 | model Post { 18 | id Int @id @default(autoincrement()) 19 | createdAt DateTime @default(now()) 20 | updatedAt DateTime @updatedAt 21 | title String 22 | content String? 23 | published Boolean @default(false) 24 | viewCount Int @default(0) 25 | author User? @relation(fields: [authorId], references: [id]) 26 | authorId Int? 27 | } 28 | -------------------------------------------------------------------------------- /test/frameworks/nuxt-prisma/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | generator client { 2 | provider = "prisma-client-js" 3 | } 4 | 5 | datasource db { 6 | provider = "sqlite" 7 | url = "file:./dev.db" 8 | } 9 | 10 | model User { 11 | id Int @id @default(autoincrement()) 12 | email String @unique 13 | name String? 14 | posts Post[] 15 | } 16 | 17 | model Post { 18 | id Int @id @default(autoincrement()) 19 | createdAt DateTime @default(now()) 20 | updatedAt DateTime @updatedAt 21 | title String 22 | content String? 23 | published Boolean @default(false) 24 | viewCount Int @default(0) 25 | author User? @relation(fields: [authorId], references: [id]) 26 | authorId Int? 27 | } 28 | -------------------------------------------------------------------------------- /test/frameworks/svelte-prisma/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | generator client { 2 | provider = "prisma-client-js" 3 | } 4 | 5 | datasource db { 6 | provider = "sqlite" 7 | url = "file:./dev.db" 8 | } 9 | 10 | model User { 11 | id Int @id @default(autoincrement()) 12 | email String @unique 13 | name String? 14 | posts Post[] 15 | } 16 | 17 | model Post { 18 | id Int @id @default(autoincrement()) 19 | createdAt DateTime @default(now()) 20 | updatedAt DateTime @updatedAt 21 | title String 22 | content String? 23 | published Boolean @default(false) 24 | viewCount Int @default(0) 25 | author User? @relation(fields: [authorId], references: [id]) 26 | authorId Int? 27 | } 28 | -------------------------------------------------------------------------------- /test/frameworks/fastify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myproject", 3 | "version": "1.0.0", 4 | "description": "This project was bootstrapped with Fastify-CLI.", 5 | "main": "app.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "test": "tap \"test/**/*.test.js\"", 11 | "start": "fastify start -l info app.js", 12 | "dev": "fastify start -w -l info -P app.js" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC", 17 | "dependencies": { 18 | "fastify": "^4.21.0", 19 | "fastify-plugin": "^4.5.1", 20 | "@fastify/autoload": "^5.7.1", 21 | "@fastify/sensible": "^5.2.0", 22 | "fastify-cli": "^5.8.0" 23 | }, 24 | "devDependencies": { 25 | "tap": "^16.3.8" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/frameworks/remix-epic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["**/*.ts", "**/*.tsx"], 3 | "compilerOptions": { 4 | "lib": ["DOM", "DOM.Iterable", "ES2022"], 5 | "isolatedModules": true, 6 | "esModuleInterop": true, 7 | "jsx": "react-jsx", 8 | "module": "nodenext", 9 | "moduleResolution": "nodenext", 10 | "resolveJsonModule": true, 11 | "target": "ES2022", 12 | "strict": true, 13 | "noImplicitAny": true, 14 | "allowJs": true, 15 | "forceConsistentCasingInFileNames": true, 16 | "paths": { 17 | "#*": ["./*"], 18 | "@/icon-name": [ 19 | "./app/components/ui/icons/name.d.ts", 20 | "./types/icon-name.d.ts" 21 | ] 22 | }, 23 | "skipLibCheck": true, 24 | "allowImportingTsExtensions": true, 25 | "noEmit": true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/base/envargs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2" 4 | }, 5 | "devDependencies": { 6 | "@types/express": "^4.17.17", 7 | "@types/node": "^20.5.1", 8 | "typescript": "^5.1.6" 9 | }, 10 | "scripts": { 11 | "build": "tsc", 12 | "start": "node build/server.js" 13 | }, 14 | "dockerfile": { 15 | "args": { 16 | "base": { 17 | "A1": "V1" 18 | }, 19 | "build": { 20 | "A2": "V2" 21 | }, 22 | "deploy": { 23 | "A3": "V3" 24 | } 25 | }, 26 | "envs": { 27 | "base": { 28 | "E1": "V1" 29 | }, 30 | "build": { 31 | "E2": "V2" 32 | }, 33 | "deploy": { 34 | "E3": "V3" 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /test/base/defer-build/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@types/node": "^20.5.1", 13 | "@types/react": "^18.2.20", 14 | "@types/react-dom": "^18.2.7", 15 | "@prisma/client": "5.1.1", 16 | "autoprefixer": "^10.4.15", 17 | "eslint": "^8.47.0", 18 | "eslint-config-next": "^13.4.19", 19 | "next": "^13.4.19", 20 | "postcss": "^8.4.28", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "tailwindcss": "^3.3.3", 24 | "typescript": "^5.1.6" 25 | }, 26 | "dockerfile": { 27 | "deferBuild": true 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/base/defer-build/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["./cypress", "./cypress.config.ts"], 3 | "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], 4 | "compilerOptions": { 5 | "lib": ["DOM", "DOM.Iterable", "ES2019"], 6 | "types": ["vitest/globals"], 7 | "isolatedModules": true, 8 | "esModuleInterop": true, 9 | "jsx": "react-jsx", 10 | "module": "CommonJS", 11 | "moduleResolution": "node", 12 | "resolveJsonModule": true, 13 | "target": "ES2019", 14 | "strict": true, 15 | "allowJs": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "~/*": ["./app/*"] 20 | }, 21 | "skipLibCheck": true, 22 | 23 | // Remix takes care of building everything in `remix build`. 24 | "noEmit": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/base/windows/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["./cypress", "./cypress.config.ts"], 3 | "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], 4 | "compilerOptions": { 5 | "lib": ["DOM", "DOM.Iterable", "ES2019"], 6 | "types": ["vitest/globals"], 7 | "isolatedModules": true, 8 | "esModuleInterop": true, 9 | "jsx": "react-jsx", 10 | "module": "CommonJS", 11 | "moduleResolution": "node", 12 | "resolveJsonModule": true, 13 | "target": "ES2019", 14 | "strict": true, 15 | "allowJs": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "~/*": ["./app/*"] 20 | }, 21 | "skipLibCheck": true, 22 | 23 | // Remix takes care of building everything in `remix build`. 24 | "noEmit": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/frameworks/remix-blues/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["./cypress", "./cypress.config.ts"], 3 | "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], 4 | "compilerOptions": { 5 | "lib": ["DOM", "DOM.Iterable", "ES2019"], 6 | "types": ["vitest/globals"], 7 | "isolatedModules": true, 8 | "esModuleInterop": true, 9 | "jsx": "react-jsx", 10 | "module": "CommonJS", 11 | "moduleResolution": "node", 12 | "resolveJsonModule": true, 13 | "target": "ES2019", 14 | "strict": true, 15 | "allowJs": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "~/*": ["./app/*"] 20 | }, 21 | "skipLibCheck": true, 22 | 23 | // Remix takes care of building everything in `remix build`. 24 | "noEmit": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/frameworks/remix-indie/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["./cypress", "./cypress.config.ts"], 3 | "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], 4 | "compilerOptions": { 5 | "lib": ["DOM", "DOM.Iterable", "ES2019"], 6 | "types": ["vitest/globals"], 7 | "isolatedModules": true, 8 | "esModuleInterop": true, 9 | "jsx": "react-jsx", 10 | "module": "CommonJS", 11 | "moduleResolution": "node", 12 | "resolveJsonModule": true, 13 | "target": "ES2019", 14 | "strict": true, 15 | "allowJs": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "~/*": ["./app/*"] 20 | }, 21 | "skipLibCheck": true, 22 | 23 | // Remix takes care of building everything in `remix build`. 24 | "noEmit": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/base/ignore-scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myproject", 3 | "version": "1.0.0", 4 | "description": "This project was bootstrapped with Fastify-CLI.", 5 | "main": "app.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "test": "tap \"test/**/*.test.js\"", 11 | "start": "fastify start -l info app.js", 12 | "dev": "fastify start -w -l info -P app.js" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC", 17 | "dependencies": { 18 | "fastify": "^4.21.0", 19 | "fastify-plugin": "^4.5.1", 20 | "@fastify/autoload": "^5.7.1", 21 | "@fastify/sensible": "^5.2.0", 22 | "fastify-cli": "^5.8.0" 23 | }, 24 | "devDependencies": { 25 | "tap": "^16.3.8" 26 | }, 27 | "dockerfile": { 28 | "ignoreScripts": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/base/legacy-peer-deps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myproject", 3 | "version": "1.0.0", 4 | "description": "This project was bootstrapped with Fastify-CLI.", 5 | "main": "app.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "scripts": { 10 | "test": "tap \"test/**/*.test.js\"", 11 | "start": "fastify start -l info app.js", 12 | "dev": "fastify start -w -l info -P app.js" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC", 17 | "dependencies": { 18 | "fastify": "^4.21.0", 19 | "fastify-plugin": "^4.5.1", 20 | "@fastify/autoload": "^5.7.1", 21 | "@fastify/sensible": "^5.2.0", 22 | "fastify-cli": "^5.8.0" 23 | }, 24 | "devDependencies": { 25 | "tap": "^16.3.8" 26 | }, 27 | "dockerfile": { 28 | "legacyPeerDeps": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/frameworks/remix-epic/docker-entrypoint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { spawn } from 'node:child_process' 4 | 5 | const env = { ...process.env } 6 | 7 | // If running the web server then migrate existing database 8 | if (process.argv.slice(-3).join(' ') === 'npm run start' && process.env.FLY_REGION === process.env.PRIMARY_REGION) { 9 | await exec('npx prisma migrate deploy') 10 | } 11 | 12 | // launch application 13 | await exec(process.argv.slice(2).join(' ')) 14 | 15 | function exec(command) { 16 | const child = spawn(command, { shell: true, stdio: 'inherit', env }) 17 | return new Promise((resolve, reject) => { 18 | child.on('exit', code => { 19 | if (code === 0) { 20 | resolve() 21 | } else { 22 | reject(new Error(`${command} failed rc=${code}`)) 23 | } 24 | }) 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /test/frameworks/next-standalone/docker-entrypoint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { spawn } = require('node:child_process') 4 | 5 | const env = { ...process.env } 6 | 7 | ;(async() => { 8 | // If running the web server then prerender pages 9 | if (process.argv.slice(-2).join(' ') === 'node server.js') { 10 | await exec('npx next build --experimental-build-mode generate') 11 | } 12 | 13 | // launch application 14 | await exec(process.argv.slice(2).join(' ')) 15 | })() 16 | 17 | function exec(command) { 18 | const child = spawn(command, { shell: true, stdio: 'inherit', env }) 19 | return new Promise((resolve, reject) => { 20 | child.on('exit', code => { 21 | if (code === 0) { 22 | resolve() 23 | } else { 24 | reject(new Error(`${command} failed rc=${code}`)) 25 | } 26 | }) 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /test/frameworks/svelte-bun/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "dev": "vite dev", 6 | "build": "vite build", 7 | "preview": "vite preview", 8 | "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", 9 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" 10 | }, 11 | "devDependencies": { 12 | "@flydotio/dockerfile": "^0.5.4", 13 | "@fontsource/fira-mono": "^4.5.10", 14 | "@neoconfetti/svelte": "^1.0.0", 15 | "@sveltejs/adapter-auto": "^3.0.0", 16 | "@sveltejs/kit": "^2.0.0", 17 | "@sveltejs/vite-plugin-svelte": "^3.0.0", 18 | "svelte": "^4.2.7", 19 | "svelte-adapter-bun": "^0.5.2", 20 | "svelte-check": "^3.6.0", 21 | "typescript": "^5.0.0", 22 | "vite": "^5.0.3" 23 | }, 24 | "type": "module" 25 | } 26 | -------------------------------------------------------------------------------- /test/frameworks/remix-pnpm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "sideEffects": false, 4 | "scripts": { 5 | "build": "remix build", 6 | "deploy": "fly deploy --remote-only", 7 | "dev": "remix dev", 8 | "start": "remix-serve build", 9 | "typecheck": "tsc" 10 | }, 11 | "dependencies": { 12 | "@remix-run/css-bundle": "^1.19.3", 13 | "@remix-run/node": "^1.19.3", 14 | "@remix-run/react": "^1.19.3", 15 | "@remix-run/serve": "^1.19.3", 16 | "isbot": "^3.6.8", 17 | "react": "^18.2.0", 18 | "react-dom": "^18.2.0" 19 | }, 20 | "devDependencies": { 21 | "@remix-run/dev": "^1.19.3", 22 | "@remix-run/eslint-config": "^1.19.3", 23 | "@types/react": "^18.2.20", 24 | "@types/react-dom": "^18.2.7", 25 | "eslint": "^8.38.0", 26 | "typescript": "^5.1.6" 27 | }, 28 | "engines": { 29 | "node": ">=14.0.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /test/base/defer-build/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | datasource db { 2 | provider = "sqlite" 3 | url = "file:./dev.db" 4 | } 5 | 6 | generator client { 7 | provider = "prisma-client-js" 8 | } 9 | 10 | model User { 11 | id String @id @default(cuid()) 12 | email String @unique 13 | 14 | createdAt DateTime @default(now()) 15 | updatedAt DateTime @updatedAt 16 | 17 | password Password? 18 | notes Note[] 19 | } 20 | 21 | model Password { 22 | hash String 23 | 24 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 25 | userId String @unique 26 | } 27 | 28 | model Note { 29 | id String @id @default(cuid()) 30 | title String 31 | body String 32 | 33 | createdAt DateTime @default(now()) 34 | updatedAt DateTime @updatedAt 35 | 36 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 37 | userId String 38 | } 39 | -------------------------------------------------------------------------------- /test/base/windows/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | datasource db { 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") 4 | } 5 | 6 | generator client { 7 | provider = "prisma-client-js" 8 | } 9 | 10 | model User { 11 | id String @id @default(cuid()) 12 | email String @unique 13 | 14 | createdAt DateTime @default(now()) 15 | updatedAt DateTime @updatedAt 16 | 17 | password Password? 18 | notes Note[] 19 | } 20 | 21 | model Password { 22 | hash String 23 | 24 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 25 | userId String @unique 26 | } 27 | 28 | model Note { 29 | id String @id @default(cuid()) 30 | title String 31 | body String 32 | 33 | createdAt DateTime @default(now()) 34 | updatedAt DateTime @updatedAt 35 | 36 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 37 | userId String 38 | } 39 | -------------------------------------------------------------------------------- /test/frameworks/next-trpc/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | datasource db { 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") 4 | } 5 | 6 | generator client { 7 | provider = "prisma-client-js" 8 | } 9 | 10 | model User { 11 | id String @id @default(cuid()) 12 | email String @unique 13 | 14 | createdAt DateTime @default(now()) 15 | updatedAt DateTime @updatedAt 16 | 17 | password Password? 18 | notes Note[] 19 | } 20 | 21 | model Password { 22 | hash String 23 | 24 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 25 | userId String @unique 26 | } 27 | 28 | model Note { 29 | id String @id @default(cuid()) 30 | title String 31 | body String 32 | 33 | createdAt DateTime @default(now()) 34 | updatedAt DateTime @updatedAt 35 | 36 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 37 | userId String 38 | } 39 | -------------------------------------------------------------------------------- /test/base/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-alpine AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apk update && \ 21 | apk add build-base gyp pkgconfig python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "npm", "run", "start" ] 40 | -------------------------------------------------------------------------------- /test/frameworks/remix-blues/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | datasource db { 2 | provider = "postgresql" 3 | url = env("DATABASE_URL") 4 | } 5 | 6 | generator client { 7 | provider = "prisma-client-js" 8 | } 9 | 10 | model User { 11 | id String @id @default(cuid()) 12 | email String @unique 13 | 14 | createdAt DateTime @default(now()) 15 | updatedAt DateTime @updatedAt 16 | 17 | password Password? 18 | notes Note[] 19 | } 20 | 21 | model Password { 22 | hash String 23 | 24 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 25 | userId String @unique 26 | } 27 | 28 | model Note { 29 | id String @id @default(cuid()) 30 | title String 31 | body String 32 | 33 | createdAt DateTime @default(now()) 34 | updatedAt DateTime @updatedAt 35 | 36 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 37 | userId String 38 | } 39 | -------------------------------------------------------------------------------- /test/frameworks/remix-indie/prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | datasource db { 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") 4 | } 5 | 6 | generator client { 7 | provider = "prisma-client-js" 8 | } 9 | 10 | model User { 11 | id String @id @default(cuid()) 12 | email String @unique 13 | 14 | createdAt DateTime @default(now()) 15 | updatedAt DateTime @updatedAt 16 | 17 | password Password? 18 | notes Note[] 19 | } 20 | 21 | model Password { 22 | hash String 23 | 24 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 25 | userId String @unique 26 | } 27 | 28 | model Note { 29 | id String @id @default(cuid()) 30 | title String 31 | body String 32 | 33 | createdAt DateTime @default(now()) 34 | updatedAt DateTime @updatedAt 35 | 36 | user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade) 37 | userId String 38 | } 39 | -------------------------------------------------------------------------------- /test/frameworks/nuxt-prisma/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt-prisma", 3 | "version": "2.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "nuxt dev", 7 | "build": "nuxt build", 8 | "start": "node .output/server/index.mjs", 9 | "generate": "nuxt generate" 10 | }, 11 | "dependencies": { 12 | "@prisma/client": "5.22.0", 13 | "nuxt": "3.14.1592" 14 | }, 15 | "devDependencies": { 16 | "@babel/eslint-parser": "7.25.9", 17 | "@flydotio/dockerfile": "github:fly-apps/dockerfile-node", 18 | "@nuxtjs/eslint-config": "12.0.0", 19 | "@nuxtjs/eslint-module": "4.1.0", 20 | "eslint": "8.57.1", 21 | "eslint-config-prettier": "9.1.0", 22 | "eslint-plugin-nuxt": "4.0.0", 23 | "eslint-plugin-prettier": "5.2.1", 24 | "prettier": "3.4.2", 25 | "prisma": "5.22.0" 26 | }, 27 | "prisma": { 28 | "seed": "node prisma/seed.js" 29 | }, 30 | "dockerfile": { 31 | "litestream": true 32 | } 33 | } -------------------------------------------------------------------------------- /test/base/bun/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust BUN_VERSION as desired 4 | ARG BUN_VERSION=xxx 5 | FROM oven/bun:${BUN_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Bun" 8 | 9 | # Bun app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY bun.lock package.json ./ 25 | RUN bun install --ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "bun", "index.ts" ] 40 | -------------------------------------------------------------------------------- /test/base/swap/docker-entrypoint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { spawn } = require('node:child_process') 4 | const { writeFileSync } = require('node:fs') 5 | 6 | const env = { ...process.env } 7 | 8 | ;(async() => { 9 | // allocate swap space 10 | await exec('fallocate -l 512M /swapfile') 11 | await exec('chmod 0600 /swapfile') 12 | await exec('mkswap /swapfile') 13 | writeFileSync('/proc/sys/vm/swappiness', '10') 14 | await exec('swapon /swapfile') 15 | writeFileSync('/proc/sys/vm/overcommit_memory', '1') 16 | 17 | // launch application 18 | await exec(process.argv.slice(2).join(' ')) 19 | })() 20 | 21 | function exec(command) { 22 | const child = spawn(command, { shell: true, stdio: 'inherit', env }) 23 | return new Promise((resolve, reject) => { 24 | child.on('exit', code => { 25 | if (code === 0) { 26 | resolve() 27 | } else { 28 | reject(new Error(`${command} failed rc=${code}`)) 29 | } 30 | }) 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /test/base/git/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential git node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package.json ./ 25 | RUN npm install 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "node", "index.js" ] 40 | -------------------------------------------------------------------------------- /test/base/port/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 4567 39 | CMD [ "npm", "run", "start" ] 40 | -------------------------------------------------------------------------------- /test/base/no-link/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "npm", "run", "start" ] 40 | -------------------------------------------------------------------------------- /test/base/version/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=100 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "npm", "run", "start" ] 40 | -------------------------------------------------------------------------------- /test/frameworks/express/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "npm", "run", "start" ] 40 | -------------------------------------------------------------------------------- /test/frameworks/vite/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "vite-plugin-svgr": "^3.2.0" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.2.15", 19 | "@types/react-dom": "^18.2.7", 20 | "@typescript-eslint/eslint-plugin": "^6.0.0", 21 | "@typescript-eslint/parser": "^6.0.0", 22 | "@vitejs/plugin-react": "^4.0.3", 23 | "autoprefixer": "^10.4.14", 24 | "eslint": "^8.45.0", 25 | "eslint-plugin-react-hooks": "^4.6.0", 26 | "eslint-plugin-react-refresh": "^0.4.3", 27 | "postcss": "^8.4.26", 28 | "tailwindcss": "^3.3.3", 29 | "typescript": "^5.0.2", 30 | "vite": "^4.4.5" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /test/frameworks/fastify/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "npx", "fastify", "start", "--address", "0.0.0.0", "-l", "info", "app.js" ] 40 | -------------------------------------------------------------------------------- /test/base/cmd-entrypoint/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Entrypoint sets up the container. 38 | ENTRYPOINT "node" 39 | 40 | # Start the server by default, this can be overwritten at runtime 41 | EXPOSE 3000 42 | CMD ./bin/www 43 | -------------------------------------------------------------------------------- /test/frameworks/next-npm/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Next.js" 8 | 9 | # Next.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run build 32 | 33 | 34 | # Final stage for app image 35 | FROM base 36 | 37 | # Copy built application 38 | COPY --from=build /app /app 39 | 40 | # Start the server by default, this can be overwritten at runtime 41 | EXPOSE 3000 42 | CMD [ "npm", "run", "start" ] 43 | -------------------------------------------------------------------------------- /test/base/dev/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci --include=dev 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run build 32 | 33 | 34 | # Final stage for app image 35 | FROM base 36 | 37 | # Copy built application 38 | COPY --from=build /app /app 39 | 40 | # Start the server by default, this can be overwritten at runtime 41 | EXPOSE 3000 42 | CMD [ "npm", "run", "start" ] 43 | -------------------------------------------------------------------------------- /test/base/distroless/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS build 6 | 7 | # Node.js app lives here 8 | WORKDIR /app 9 | 10 | # Set production environment 11 | ENV NODE_ENV="production" 12 | 13 | # Install packages needed to build node modules 14 | RUN apt-get update -qq && \ 15 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 16 | 17 | # Install node modules 18 | COPY package-lock.json package.json ./ 19 | RUN npm ci 20 | 21 | # Copy application code 22 | COPY . . 23 | 24 | 25 | # Final stage for app image 26 | FROM gcr.io/distroless/nodejs${NODE_VERSION} 27 | 28 | LABEL fly_launch_runtime="Node.js" 29 | 30 | # Node.js app lives here 31 | WORKDIR /app 32 | 33 | # Set production environment 34 | ENV NODE_ENV="production" 35 | 36 | # Copy built application 37 | COPY --from=build /app /app 38 | 39 | # Start the server by default, this can be overwritten at runtime 40 | EXPOSE 3000 41 | CMD [ "node", "./bin/www" ] 42 | -------------------------------------------------------------------------------- /test/frameworks/nest/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="NestJS" 8 | 9 | # NestJS app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci --include=dev 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run build 32 | 33 | 34 | # Final stage for app image 35 | FROM base 36 | 37 | # Copy built application 38 | COPY --from=build /app /app 39 | 40 | # Start the server by default, this can be overwritten at runtime 41 | EXPOSE 3000 42 | CMD [ "npm", "run", "start" ] 43 | -------------------------------------------------------------------------------- /test/frameworks/next-trpc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "trpc-nextjs", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "build": "next build", 7 | "dev": "next dev", 8 | "postinstall": "prisma generate", 9 | "start": "next start" 10 | }, 11 | "dependencies": { 12 | "@prisma/client": "5.22.0", 13 | "@tanstack/react-query": "4.36.1", 14 | "@trpc/client": "10.45.2", 15 | "@trpc/next": "10.45.2", 16 | "@trpc/react-query": "10.45.2", 17 | "@trpc/server": "10.45.2", 18 | "next": "14.2.21", 19 | "react": "18.3.1", 20 | "react-dom": "18.3.1", 21 | "react-markdown": "9.0.1", 22 | "superjson": "2.2.2", 23 | "zod": "3.24.1" 24 | }, 25 | "devDependencies": { 26 | "@types/node": "22.10.2", 27 | "@types/react": "18.3.18", 28 | "@types/react-dom": "18.3.5", 29 | "prisma": "5.22.0", 30 | "ts-node": "10.9.2", 31 | "typescript": "5.7.2" 32 | }, 33 | "ct3aMetadata": { 34 | "initVersion": "7.3.2" 35 | }, 36 | "prisma": { 37 | "seed": "ts-node ./prisma/seed.ts" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/base/ignore-scripts/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci --ignore-scripts 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "npx", "fastify", "start", "--address", "0.0.0.0", "-l", "info", "app.js" ] 40 | -------------------------------------------------------------------------------- /test/base/legacy-peer-deps/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci --legacy-peer-deps 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Start the server by default, this can be overwritten at runtime 38 | EXPOSE 3000 39 | CMD [ "npx", "fastify", "start", "--address", "0.0.0.0", "-l", "info", "app.js" ] 40 | -------------------------------------------------------------------------------- /test/base/swap/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Entrypoint sets up the container. 38 | ENTRYPOINT [ "/app/docker-entrypoint.js" ] 39 | 40 | # Start the server by default, this can be overwritten at runtime 41 | EXPOSE 3000 42 | CMD [ "npm", "run", "start" ] 43 | -------------------------------------------------------------------------------- /test/frameworks/gatsby/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Gatsby" 8 | 9 | # Gatsby app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci --legacy-peer-deps 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run build 32 | 33 | 34 | # Final stage for app image 35 | FROM base 36 | 37 | # Copy built application 38 | COPY --from=build /app /app 39 | 40 | # Start the server by default, this can be overwritten at runtime 41 | EXPOSE 8080 42 | CMD [ "npx", "gatsby", "serve", "-H", "0.0.0.0" ] 43 | -------------------------------------------------------------------------------- /test/frameworks/astro-static/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Astro" 8 | 9 | # Astro app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run build 32 | 33 | 34 | # Final stage for app image 35 | FROM nginx 36 | 37 | # Copy built application 38 | COPY --from=build /app/dist /usr/share/nginx/html 39 | 40 | # Start the server by default, this can be overwritten at runtime 41 | EXPOSE 80 42 | CMD [ "/usr/sbin/nginx", "-g", "daemon off;" ] 43 | -------------------------------------------------------------------------------- /test/base/windows/docker-entrypoint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { spawn } = require('node:child_process') 4 | const fs = require('node:fs') 5 | 6 | const env = { ...process.env } 7 | 8 | ;(async() => { 9 | // If running the web server then migrate existing database 10 | if (process.argv.slice(-3).join(' ') === 'npx remix-serve ./build/index.js') { 11 | const url = new URL(process.env.DATABASE_URL) 12 | const target = url.protocol === 'file:' && url.pathname 13 | const newDb = target && !fs.existsSync(target) 14 | await exec('npx prisma migrate deploy') 15 | if (newDb) await exec('ts-node --require tsconfig-paths/register prisma/seed.ts') 16 | } 17 | 18 | // launch application 19 | await exec(process.argv.slice(2).join(' ')) 20 | })() 21 | 22 | function exec(command) { 23 | const child = spawn(command, { shell: true, stdio: 'inherit', env }) 24 | return new Promise((resolve, reject) => { 25 | child.on('exit', code => { 26 | if (code === 0) { 27 | resolve() 28 | } else { 29 | reject(new Error(`${command} failed rc=${code}`)) 30 | } 31 | }) 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /test/fly/sqlite3/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Copy built application 35 | COPY --from=build /app /app 36 | 37 | # Setup sqlite3 on a separate volume 38 | RUN mkdir -p /data 39 | VOLUME /data 40 | 41 | # Start the server by default, this can be overwritten at runtime 42 | EXPOSE 3000 43 | ENV DATABASE_URL="file:///data/sqlite.db" 44 | CMD [ "npm", "run", "start" ] 45 | -------------------------------------------------------------------------------- /test/base/build/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci --include=dev 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run tsc 32 | 33 | # Remove development dependencies 34 | RUN npm prune --omit=dev 35 | 36 | 37 | # Final stage for app image 38 | FROM base 39 | 40 | # Copy built application 41 | COPY --from=build /app /app 42 | 43 | # Start the server by default, this can be overwritten at runtime 44 | EXPOSE 3000 45 | CMD [ "npm", "run", "start" ] 46 | -------------------------------------------------------------------------------- /test/frameworks/remix-indie/docker-entrypoint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { spawn } = require('node:child_process') 4 | const fs = require('node:fs') 5 | 6 | const env = { ...process.env } 7 | 8 | ;(async() => { 9 | // If running the web server then migrate existing database 10 | if (process.argv.slice(-3).join(' ') === 'npx remix-serve ./build/index.js') { 11 | const url = new URL(process.env.DATABASE_URL) 12 | const target = url.protocol === 'file:' && url.pathname 13 | const newDb = target && !fs.existsSync(target) 14 | await exec('npx prisma migrate deploy') 15 | if (newDb) await exec('ts-node --require tsconfig-paths/register prisma/seed.ts') 16 | } 17 | 18 | // launch application 19 | await exec(process.argv.slice(2).join(' ')) 20 | })() 21 | 22 | function exec(command) { 23 | const child = spawn(command, { shell: true, stdio: 'inherit', env }) 24 | return new Promise((resolve, reject) => { 25 | child.on('exit', code => { 26 | if (code === 0) { 27 | resolve() 28 | } else { 29 | reject(new Error(`${command} failed rc=${code}`)) 30 | } 31 | }) 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Next.js" 8 | 9 | # Next.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | ARG YARN_VERSION=xxx 15 | RUN npm install -g yarn@$YARN_VERSION --force 16 | 17 | 18 | # Throw-away build stage to reduce size of final image 19 | FROM base AS build 20 | 21 | # Install packages needed to build node modules 22 | RUN apt-get update -qq && \ 23 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 24 | 25 | # Install node modules 26 | COPY package.json yarn.lock ./ 27 | RUN yarn install --frozen-lockfile 28 | 29 | # Copy application code 30 | COPY . . 31 | 32 | # Build application 33 | RUN yarn run build 34 | 35 | 36 | # Final stage for app image 37 | FROM base 38 | 39 | # Copy built application 40 | COPY --from=build /app /app 41 | 42 | # Start the server by default, this can be overwritten at runtime 43 | EXPOSE 3000 44 | CMD [ "yarn", "run", "start" ] 45 | -------------------------------------------------------------------------------- /test/frameworks/vite/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Vite" 8 | 9 | # Vite app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci --include=dev 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run build 32 | 33 | # Remove development dependencies 34 | RUN npm prune --omit=dev 35 | 36 | 37 | # Final stage for app image 38 | FROM nginx 39 | 40 | # Copy built application 41 | COPY --from=build /app/dist /usr/share/nginx/html 42 | 43 | # Start the server by default, this can be overwritten at runtime 44 | EXPOSE 80 45 | CMD [ "/usr/sbin/nginx", "-g", "daemon off;" ] 46 | -------------------------------------------------------------------------------- /test/frameworks/next-pnpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Next.js" 8 | 9 | # Next.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | # Install pnpm 16 | ARG PNPM_VERSION=xxx 17 | RUN npm install -g pnpm@$PNPM_VERSION 18 | 19 | 20 | # Throw-away build stage to reduce size of final image 21 | FROM base AS build 22 | 23 | # Install packages needed to build node modules 24 | RUN apt-get update -qq && \ 25 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 26 | 27 | # Install node modules 28 | COPY package.json pnpm-lock.yaml ./ 29 | RUN pnpm install --frozen-lockfile 30 | 31 | # Copy application code 32 | COPY . . 33 | 34 | # Build application 35 | RUN pnpm run build 36 | 37 | 38 | # Final stage for app image 39 | FROM base 40 | 41 | # Copy built application 42 | COPY --from=build /app /app 43 | 44 | # Start the server by default, this can be overwritten at runtime 45 | EXPOSE 3000 46 | CMD [ "pnpm", "run", "start" ] 47 | -------------------------------------------------------------------------------- /test/frameworks/astro-ssr/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Astro" 8 | 9 | # Astro app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package-lock.json package.json ./ 25 | RUN npm ci 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | # Build application 31 | RUN npm run build 32 | 33 | 34 | # Final stage for app image 35 | FROM base 36 | 37 | # Copy built application 38 | COPY --from=build /app/node_modules /app/node_modules 39 | COPY --from=build /app/dist /app/dist 40 | 41 | ENV PORT=4321 42 | ENV HOST=0.0.0.0 43 | 44 | # Start the server by default, this can be overwritten at runtime 45 | EXPOSE 4321 46 | CMD [ "node", "./dist/server/entry.mjs" ] 47 | -------------------------------------------------------------------------------- /test/base/defer-build/docker-entrypoint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { spawn } = require('node:child_process') 4 | const path = require('node:path') 5 | const fs = require('node:fs') 6 | 7 | const env = { ...process.env } 8 | 9 | ;(async() => { 10 | // If running the web server then migrate existing database 11 | if (process.argv.slice(-3).join(' ') === 'npm run start') { 12 | // place Sqlite3 database on volume 13 | const source = path.resolve('./dev.db') 14 | const target = '/data/' + path.basename(source) 15 | if (!fs.existsSync(source) && fs.existsSync('/data')) fs.symlinkSync(target, source) 16 | 17 | // prepare database 18 | await exec('npx prisma migrate deploy') 19 | await exec('npm run build') 20 | } 21 | 22 | // launch application 23 | await exec(process.argv.slice(2).join(' ')) 24 | })() 25 | 26 | function exec(command) { 27 | const child = spawn(command, { shell: true, stdio: 'inherit', env }) 28 | return new Promise((resolve, reject) => { 29 | child.on('exit', code => { 30 | if (code === 0) { 31 | resolve() 32 | } else { 33 | reject(new Error(`${command} failed rc=${code}`)) 34 | } 35 | }) 36 | }) 37 | } 38 | -------------------------------------------------------------------------------- /test/base/fluent-ffmpeg/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | 16 | # Throw-away build stage to reduce size of final image 17 | FROM base AS build 18 | 19 | # Install packages needed to build node modules 20 | RUN apt-get update -qq && \ 21 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 22 | 23 | # Install node modules 24 | COPY package.json ./ 25 | RUN npm install 26 | 27 | # Copy application code 28 | COPY . . 29 | 30 | 31 | # Final stage for app image 32 | FROM base 33 | 34 | # Install packages needed for deployment 35 | RUN apt-get update -qq && \ 36 | apt-get install --no-install-recommends -y ffmpeg && \ 37 | rm -rf /var/lib/apt/lists /var/cache/apt/archives 38 | 39 | # Copy built application 40 | COPY --from=build /app /app 41 | 42 | # Start the server by default, this can be overwritten at runtime 43 | EXPOSE 3000 44 | CMD [ "npm", "run", "start" ] 45 | -------------------------------------------------------------------------------- /test/frameworks/next-yarn4/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Next.js" 8 | 9 | # Next.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | ARG YARN_VERSION=xxx 15 | 16 | # Install Yarn 4 17 | RUN corepack enable && \ 18 | yarn set version ${YARN_VERSION} 19 | 20 | 21 | # Throw-away build stage to reduce size of final image 22 | FROM base AS build 23 | 24 | # Install packages needed to build node modules 25 | RUN apt-get update -qq && \ 26 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 27 | 28 | # Install node modules 29 | COPY package.json yarn.lock ./ 30 | RUN yarn install --immutable 31 | 32 | # Copy application code 33 | COPY . . 34 | 35 | # Build application 36 | RUN yarn run build 37 | 38 | 39 | # Final stage for app image 40 | FROM base 41 | 42 | # Copy built application 43 | COPY --from=build /app /app 44 | 45 | # Start the server by default, this can be overwritten at runtime 46 | EXPOSE 3000 47 | CMD [ "yarn", "run", "start" ] 48 | -------------------------------------------------------------------------------- /test/frameworks/nuxt/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Nuxt" 8 | 9 | # Nuxt app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | ARG YARN_VERSION=xxx 15 | RUN npm install -g yarn@$YARN_VERSION --force 16 | 17 | 18 | # Throw-away build stage to reduce size of final image 19 | FROM base AS build 20 | 21 | # Install packages needed to build node modules 22 | RUN apt-get update -qq && \ 23 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 24 | 25 | # Install node modules 26 | COPY package.json yarn.lock ./ 27 | RUN yarn install --frozen-lockfile --production=false 28 | 29 | # Copy application code 30 | COPY . . 31 | 32 | # Build application 33 | RUN yarn run build 34 | 35 | 36 | # Final stage for app image 37 | FROM base 38 | 39 | # Copy built application 40 | COPY --from=build /app/.output /app/.output 41 | 42 | # Start the server by default, this can be overwritten at runtime 43 | EXPOSE 3000 44 | ENV HOST=0 45 | CMD [ "node", ".output/server/index.mjs" ] 46 | -------------------------------------------------------------------------------- /test/frameworks/svelte-prisma/docker-entrypoint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { spawn } from 'node:child_process' 4 | import path from 'node:path' 5 | import fs from 'node:fs' 6 | 7 | const env = { ...process.env } 8 | 9 | // If running the web server then migrate existing database 10 | if (process.argv.slice(-2).join(' ') === 'node ./build/index.js') { 11 | // place Sqlite3 database on volume 12 | const source = path.resolve('./dev.db') 13 | const target = '/data/' + path.basename(source) 14 | if (!fs.existsSync(source) && fs.existsSync('/data')) fs.symlinkSync(target, source) 15 | const newDb = !fs.existsSync(target) 16 | 17 | // prepare database 18 | await exec('npx prisma migrate deploy') 19 | if (newDb) await exec('tsx prisma/seed.ts') 20 | } 21 | 22 | // launch application 23 | await exec(process.argv.slice(2).join(' ')) 24 | 25 | function exec(command) { 26 | const child = spawn(command, { shell: true, stdio: 'inherit', env }) 27 | return new Promise((resolve, reject) => { 28 | child.on('exit', code => { 29 | if (code === 0) { 30 | resolve() 31 | } else { 32 | reject(new Error(`${command} failed rc=${code}`)) 33 | } 34 | }) 35 | }) 36 | } 37 | -------------------------------------------------------------------------------- /test/base/instructions/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax = docker/dockerfile:1 2 | 3 | # Adjust NODE_VERSION as desired 4 | ARG NODE_VERSION=xxx 5 | FROM node:${NODE_VERSION}-slim AS base 6 | 7 | LABEL fly_launch_runtime="Node.js" 8 | 9 | # Node.js app lives here 10 | WORKDIR /app 11 | 12 | # Set production environment 13 | ENV NODE_ENV="production" 14 | 15 | # base additions 16 | 17 | 18 | # Throw-away build stage to reduce size of final image 19 | FROM base AS build 20 | 21 | # Install packages needed to build node modules 22 | RUN apt-get update -qq && \ 23 | apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 24 | 25 | # Install node modules 26 | COPY package-lock.json package.json ./ 27 | RUN npm ci --include=dev 28 | 29 | # Copy application code 30 | COPY . . 31 | 32 | # Build application 33 | RUN npm run build 34 | 35 | # Remove development dependencies 36 | RUN npm prune --omit=dev 37 | 38 | # build additions 39 | 40 | 41 | # Final stage for app image 42 | FROM base 43 | 44 | # Copy built application 45 | COPY --from=build /app /app 46 | 47 | # deploy additions 48 | 49 | # Start the server by default, this can be overwritten at runtime 50 | EXPOSE 3000 51 | CMD [ "npm", "run", "start" ] 52 | -------------------------------------------------------------------------------- /test/base/windows/app/root.tsx: -------------------------------------------------------------------------------- 1 | import { cssBundleHref } from "@remix-run/css-bundle"; 2 | import type { LinksFunction, LoaderArgs } from "@remix-run/node"; 3 | import { json } from "@remix-run/node"; 4 | import { 5 | Links, 6 | LiveReload, 7 | Meta, 8 | Outlet, 9 | Scripts, 10 | ScrollRestoration, 11 | } from "@remix-run/react"; 12 | 13 | import { getUser } from "~/session.server"; 14 | import stylesheet from "~/tailwind.css"; 15 | 16 | export const links: LinksFunction = () => [ 17 | { rel: "stylesheet", href: stylesheet }, 18 | ...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []), 19 | ]; 20 | 21 | export const loader = async ({ request }: LoaderArgs) => { 22 | return json({ user: await getUser(request) }); 23 | }; 24 | 25 | export default function App() { 26 | return ( 27 | 28 |
29 | 30 | 31 | 32 |