cozy-stack icon indicating copy to clipboard operation
cozy-stack copied to clipboard

Remove differences between serve and cozy-app-dev.sh

Open ptbrowne opened this issue 4 years ago • 3 comments

It seems like cozy-stack serve and cozy-app-dev.sh could be merged ? It would make onboarding a little easier. Internally, some people use cozy-app-dev and some use cozy-stack serve. Listing differences :

  • Support for multi app
  • Creation of the Cozy if destroyed
  • cozy-app-dev can install/update the binary for the stack
  • cozy-app-dev starts cozy-stack serve with the --mailhog flag
  • cozy-app-dev starts cozy-stack serve with the --allow-root flag (I think it was added for windows developers)

EDIT: Added the differences listed below by nono

ptbrowne avatar Jan 26 '21 09:01 ptbrowne

There are other differences:

  • cozy-app-dev can install/update the binary for the stack
  • cozy-app-dev starts cozy-stack serve with the --mailhog flag
  • cozy-app-dev starts cozy-stack serve with the --allow-root flag (I think it was added for windows developers)

The support for multi-app is the only thing that could be moved to cozy-stack serve. For the other differences, I think we should still use cozy-app-dev (and improve it if needed).

nono avatar Jan 26 '21 09:01 nono

I think the main idea behind using cozy-stack serve was to reduce the number of executables to know. Here, I think it is justified that

  1. cozy-stack serve should not take care of creating an instance
  2. Running with --allow-root or --mailhog by default

On the other hand, it seems it would be more ergonomic to only have to use the cozy-stack binary. Do you think adding a cozy-stack dev command would be a good compromise ? Not polluting serve with dev only concerns, while simplifying usage by using a single entrypoint.

ptbrowne avatar Jan 26 '21 09:01 ptbrowne

Je pense qu'on pourrait commencer par lister les différents cas à prendre en compte par ce cozy-stack dev et de lister les problèmes rencontrés en utilisant cozy-stack serve afin de voir s'il y a une réelle pertinence.

D'un point de vue extérieur il n'y a eu qu'un cas problématique en 6 mois (le fait de s'assurer qu'il y a bien une instance de créée avant de lancer un serve) et de mon expérience perso l'utilisation de cozy-stack serve et ultra limitée et se résume à toujours lancer la même commande.

J'ai eu quelques déboire avec cozy-stack quand j'ai eu besoin de faire du multi-instance, mais j'ai été content de comprendre le fonctionnement et de pouvoir me débrouiller avec des commandes "bas niveau".

JF-Cozy avatar Jan 27 '21 14:01 JF-Cozy