Conversation
- it's using all commands available in server
harminius
approved these changes
Feb 7, 2025
Pull Request Test Coverage Report for Build 13237930325Details
💛 - Coveralls |
varmar05
reviewed
Feb 10, 2025
| fg="red", | ||
| ), | ||
| _echo_error( | ||
| "No base URL set. Please set MERGIN_BASE_URL environment variable", |
Collaborator
There was a problem hiding this comment.
shall we also check contact_email variable? I'd maybe use it for admin/test email
Collaborator
Author
There was a problem hiding this comment.
we can, but it's not required variable - see docs https://merginmaps.com/docs/server/administer/environment/
|
|
||
| tables = db.engine.table_names() | ||
| if not tables or recreate: | ||
| _init_db() |
Collaborator
There was a problem hiding this comment.
this recreate flag might be dangerous, shall we ask for user confirmation?
- use default value CONTACT_EMAIL for init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
initcommand$ flask init --help Usage: flask init [OPTIONS] Initialize database if does not exist or -r is provided. Perform check of server configuration. Send statistics, respecting your setup. Options: -e, --email TEXT [required] -r, --recreate Recreate database and admin user. --help Show this message and exit.Initialization of fresh server
The -e/--email option is required. This parameter is used for creating the admin user and sending a check email.
Several steps are performed by this command when a fresh server instance is initialized:
*If COLLECT_STATISTICS is enabled, the command attempts to send statistics to MM servers.
Initialization of an already initialized server
The
-r/--recreateoption recreating database and admin user with new password from scratch.initcommand with already initialized DB, without-rand disabledCOLLECT_STATISTICS. It's just sending check email and perform health check.init-dbcommandIt's just creating new database and and new MerginInfo row with service id. It could be still used for development.