vanpet
vanpet
DDeno
Created by vanpet on 10/16/2023 in #help
RUN deno task in Dockerfile
I have made a script to make DB migrations happen using "deno task migration", and I'd love for it to run that during deployment, using a Dockerfile. Currently my dockerfile looks like this: FROM denoland/deno:1.37.1 WORKDIR /app USER deno EXPOSE 3001 RUN deno task migration init RUN deno task migration run CMD ["deno", "run", "--allow-env", "--allow-read", "--allow-write", "--allow-net", "./src/app.ts"] But during the deployment (using Fly.io), I get an error " > [3/4] RUN deno task migration init: #0 0.242 error: No config file found" I'm a bit lost on what to do next, because those tasks run well locally, the deno.json is there at the root of my project. It looks like this: { "tasks": { "prod": "deno run --allow-env --allow-read --allow-net ./src/app.ts", "dev": "deno run --allow-env --allow-read --allow-net --watch ./src/app.ts", "migration": "deno run --allow-env --allow-read --allow-write --allow-net ./src/database/migrate.ts" } } Can someone point me to the correct direction? Thanks.
2 replies