Skip to content

Commit 32e0264

Browse files
authored
Dockerfile update to fix database issue on render.com
As data.db is part of the .gitignore render.com we need to trigger COPY . . flask db upgrade at deploy
1 parent d91e28f commit 32e0264

File tree

1 file changed

+5
-0
lines changed
  • docs/docs/11_deploy_to_render/02_create_render_web_service

1 file changed

+5
-0
lines changed

docs/docs/11_deploy_to_render/02_create_render_web_service/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ While on the free plan, deployments are a bit slow. It has to build your image a
4040

4141
Now, you can access your service URL and try it out using Insomnia or Postman!
4242

43+
:::warning
44+
if data.db is part of the .gitignore file you need to call *flask db migrate* to populate the sqlite database. Since the free plan does not provide the CLI, you can do this in the Dockerfile by adding
45+
*RUN flask db upgrade* after *COPY . .*
46+
:::
47+
4348
![](./assets/insomnia-test-prod.png)
4449

4550
:::warning

0 commit comments

Comments
 (0)