Tech-Nik
Tech-Nik
CDCloudflare Developers
Created by Tech-Nik on 5/16/2024 in #workers-help
Docker x Wrangler
Accidentaly posted inside general help :NotLikeThis: sorryyy https://discord.com/channels/595317990191398933/1240726123034316942
3 replies
CDCloudflare Developers
Created by Tech-Nik on 5/16/2024 in #general-help
Wrangler x Docker
Hey guys I need some help setting up wrangler (dev) inside a docker container. The project i want to containerize and run locally would be: https://github.com/lyc8503/UptimeFlare This would be my Dockerfile: https://github.com/Its4Nik/UptimeFlare/blob/main/Dockerfile This would be the wrangler-dev.toml
name = "uptimeflare_worker"
main = "src/index.ts"
compatibility_date = "2023-11-08"
kv_namespaces = [{ binding = "UPTIMEFLARE_STATE", id = "UPTIMEFLARE_STATE" }]
name = "uptimeflare_worker"
main = "src/index.ts"
compatibility_date = "2023-11-08"
kv_namespaces = [{ binding = "UPTIMEFLARE_STATE", id = "UPTIMEFLARE_STATE" }]
The error I am getting is this one:
Failed to load .env file "/app/worker/.dev.vars": Error: ENOENT: no such file or directory, open '/app/worker/.dev.vars' at Object.openSync (node:fs:573:18) at Object.readFileSync (node:fs:452:35) at tryLoadDotEnv (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:158864:72) at loadDotEnv (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:158873:12) at getVarsForDev (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:197634:18) at getBindings (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205523:10) at getBindingsAndAssetPaths (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205404:20) at getDevReactElement (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205076:40) at startDev (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205140:60) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errno: -2, code: 'ENOENT', syscall: 'open', path: '/app/worker/.dev.vars'
Failed to load .env file "/app/worker/.dev.vars": Error: ENOENT: no such file or directory, open '/app/worker/.dev.vars' at Object.openSync (node:fs:573:18) at Object.readFileSync (node:fs:452:35) at tryLoadDotEnv (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:158864:72) at loadDotEnv (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:158873:12) at getVarsForDev (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:197634:18) at getBindings (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205523:10) at getBindingsAndAssetPaths (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205404:20) at getDevReactElement (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205076:40) at startDev (/usr/local/lib/node_modules/wrangler/wrangler-dist/cli.js:205140:60) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errno: -2, code: 'ENOENT', syscall: 'open', path: '/app/worker/.dev.vars'
And I couldn't find any information for the .dev.vars file... Thanks in advance! If needed I can provide more information
12 replies