feat: added seed script for db and backend run#56
Conversation
maya-ots
left a comment
There was a problem hiding this comment.
thank you for your work,
i followed the mobile quickstart guide from a clean checkout and ran into a couple of setup issues:
-
The README references
.env.mobile.examplebut I couldn't find that file in the branch -
docker-compose.mobile.ymlusesenv_file: .envwhich caused Docker to look formobile-quickstart/.env
running the documented steps resulted in:
env file .../mobile-quickstart/.env not found
- It looks like the README and the compose configuration are out of sync. Could you clarify which environment file should be used or update the quickstart accordingly?
| ## Folder contents | ||
|
|
||
| * `docker-compose.mobile.yml` — defines all backend services | ||
| * `.env.mobile` — environment variables (copy from `.env.mobile.example`) | ||
| * `scripts/seed.py` — database seed script | ||
| * `README.md` — this file |
There was a problem hiding this comment.
thank you for your work!!
i tried following the quickstart from a clean checkout of this branch, but I couldn't find .env.mobile.example in mobile-quickstart the README mentions copying it to .env.mobile but it doesn't seem to be included in the PR, am I missing a file or should the README be updated?
| ### 1. Copy the env file | ||
|
|
||
| ```bash | ||
| cp .env.mobile.example .env.mobile |
There was a problem hiding this comment.
following this step wasn't possible because .env.mobile.example isn't present in the branch.
| fastapi: | ||
| image: ghcr.io/microclub-usthb/multai-back:latest | ||
| restart: unless-stopped | ||
| env_file: .env |
There was a problem hiding this comment.
the README refers to .env.mobile but the compose file is looking for .env when running docker compose Docker searches for mobile-quickstart/.env which doesn't exist. Should this reference .env.mobile, ../.env, or is a .env file supposed to be committed to mobile-quickstart?
|
|
||
| --- | ||
|
|
||
| ## First time setup |
There was a problem hiding this comment.
i followed these steps on Windows and got :
env file .../mobile-quickstart/.env not found
it looks like the compose file and README are currently out of sync
but overall, great work!!
There was a problem hiding this comment.
yeah I forgot to add the example file and update readme ( files were in the repo folder not in a dedicated mobile folder ) lmao , i believe i fixed it now just put the mobile folder inside your repo folder and run the commands it should work
There was a problem hiding this comment.
the .env.mobile.example issue is fixed after the latest update. however, running docker compose -f docker-compose.mobile.yml up -d now fails because the migrate service exits with :
ERROR: Multiple head revisions are present for given argument 'head'
it looks like Alembic detects multiple migration heads during startup fastapi never starts (migrate exits with code 1 and the fastapi container remains in the Created state). could you check whether the migration heads need to be merged or whether the published image is up to date?
There was a problem hiding this comment.
Your docker was just using an old image , I added image pull command to fix that
No description provided.