Créer un fichier .env
basé sur .env.development
:
cp .env.development .env`
Lancer le conteneur de BDD :
docker compose up
Installer les dépendences et lancer l'app :
yarn # to install dependencies
yarn dev # to run in dev mode
Ouvrir la page d'accueil http://127.0.0.1:3000/ and start playing.
Use React DSFR Storybook : https://components.react-dsfr.codegouv.studio
Pour les modifications de BDD :
Créer le fichier de migration et completer le up
et le down
:
yarn kysely migrate make MIGRATION_NAME
Executer la migration et mettre les types:
yarn kysely migrate latest
yarn kysely-codegen
# run unit tests with vitest
yarn test
# run storybook
yarn storybook
docker compose --env-file .env.test up
# build, serve and launch playwright interactive end-to-end tests
yarn e2e --ui
Follow production logs:
journalctl -u ollama.service -f
Watch GPU usage:
watch -n 1 nvidia-smi
Pull a model:
curl http://localhost:11434/api/pull -d '{"model": "mistral-small:latest"}'
Get token:
curl -X 'GET' \
'https://aides-territoires.beta.gouv.fr/api/connexion' \
-H 'accept: application/ld+json' \
-H 'X-AUTH-TOKEN: myAidesTerritoiresToken'