-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamline getting started experience #3117
Comments
Let's remove the DB step also in that quick start - is it really necessary to choose a DB type to experience Vendure? My answer would be no. We generally tend to recommend to use Postgres, so that quick start should also use that. Everything else should be configurable via interactive prompts or non-interactive options (e.g. It should also automatically start server and worker after scaffolding the new Vendure installation. |
Flow chart of the new process: flowchart TD
A[Start] --> B{Prompt: Quick Start or Manual Configuration}
B -->|Quick Start| C{automated check: Is Docker running?}
C -->|Yes| D[Continue with installation]
C -->|No| E[Attempt to start Docker]
E --> F{Could Docker be started?}
F -->|Yes| D
F -->|No| G[Install with SQLite]
G-->D
B -->|Manual Configuration| H[Select DB]
H --> I[Enter credentials etc as with current flow]
I --> D[Continue installation]
D --> Z[End]
|
Maybe we can also provide two setups in the quick config:
|
@Draykee With the quick config we are aiming to reduce the number of prompts/steps to an absolute minimum. But I agree that there is room for improvement with tooling & setup for prod & dev. This is actually something we are thinking of rolling into the Vendure CLI. For example: The goal is to get to the point where every common task is one CLI command away - dev, build, deploy. |
I think I vaguely remember the script failing only after putting in all of the prompts because the folder already existed. Would be nice to check beforehand to save having to rerun everything. I may misremember its been a while. Also the Dockerfile could generally be made leaner by multi staged builds that only copy over actually built artifacts instead of copying everything for example. |
@DanielBiegler improvements to all things Docker are coming. I am already cooking something! 🧑🍳 |
I would not use SQLite as a Docker default db, given that it has limitations in terms of what it can do. I would use Postgres. My guess is: if you don't use a production level database, you will open up a whole stream of issues on github with things that don't work as expected because it's SQLLite. Based on the input choice, we could actually pull and install the database server if it's not found. On our installation we have a yarn command for that using docker-compose (we also install all related servers, such as in our case Gotify). That way, you blow through the database installation and make it even more seamless. |
@mschipperheyn it is Postgres actually. SQLite is just a fallback in case Docker is not installed or cannot be started (automatically and manually) |
Our
@vendure/create
package is used to set up new Vendure projects. It is also used by developers looking to quickly try out Vendure for themselves.It uses a series of prompts to collect the required information to scaffold a project directory with the correct configuration.
Current flow
Issues
Improved flow
We should aim to cut down the number of steps to an absolute minimum. Therefore we should have 2 flows:
So the quick start would consist of just these steps:
npx @vendure/create my-shop
Docker detection
In the "quick start" flow:
We need to detect whether docker is running locally. Something like executing
docker -v
and testing the result / catching the error would probably suffice.If docker is not detected, we can possibly try to start it automatically (research this), or at least prompt the user to start it and try again. If docker is simply not available, we could either 1) default to SQLite or 2) put user into the custom flow.
The text was updated successfully, but these errors were encountered: