Skip to content

feat: added seed script for db and backend run#56

Open
Tyjfre-j wants to merge 4 commits into
developfrom
feat/mobile-quickstart
Open

feat: added seed script for db and backend run#56
Tyjfre-j wants to merge 4 commits into
developfrom
feat/mobile-quickstart

Conversation

@Tyjfre-j

Copy link
Copy Markdown
Collaborator

No description provided.

@maya-ots maya-ots left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.example but I couldn't find that file in the branch

  • docker-compose.mobile.yml uses env_file: .env which caused Docker to look for mobile-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?

Comment on lines +14 to +19
## 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your docker was just using an old image , I added image pull command to fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants