Getting Started
Command Line Arguments
Gigantics can be configured using command line arguments when starting the server. These arguments provide a way to override configuration file settings or specify runtime options.
Basic Usage
Available Arguments
Configuration File
--configor-c- Specify the configuration file path- Default:
./config/default.yaml - Example:
./gig start -c ./config/production.yaml
- Default:
Daemon Mode
--daemonor-d- Run the server as a daemon process in the background- Default:
false - Example:
./gig start -d
- Default:
Process Identifier
--nameor-n- Set the main process identifier name- Example:
./gig start -n "gigantics-production"
- Example:
Server Configuration Overrides
--hostname- Override the server hostname- Example:
./gig start --hostname=0.0.0.0
- Example:
--baseUrl- Override the server base URL- Example:
./gig start --baseUrl=https://gigantics.company.com
- Example:
--port- Override the server port- Example:
./gig start --port=8080
- Example:
Database Configuration Overrides
--db-host- Override the database host- Example:
./gig start --db-host=mongodb.company.com
- Example:
--db-port- Override the database port- Example:
./gig start --db-port=27018
- Example:
--db- Override the database name- Example:
./gig start --db=gigantics_prod
- Example:
Logging Override
--logLevel- Override the logging level- Options:
error,warn,info,http,verbose,debug,silly - Example:
./gig start --logLevel=debug
- Options:
Worker Configuration
--webor-w- Start web workers (cluster mode)- Values:
-1- Disable clustering0- Fork to all available CPUsN- Fork to N workers (positive number)
- Example:
./gig start -w=4
- Values:
--jobor-j- Start job workers- Example:
./gig start -j=3
- Example:
Examples
Production Start with Daemon Mode
Development Start with Debug Logging
Custom Port and Host
Cluster Mode
Database Override
Combined Arguments
Argument Priority
Command line arguments override configuration file settings in this order:
- Default values in code
- Configuration file settings
- Environment variables (where applicable)
- Command line arguments
Windows Usage
On Windows, use the .exe extension:
Best Practices
- Configuration Files: Use configuration files for persistent settings and command line arguments for temporary overrides
- Production: Always specify a configuration file in production environments
- Security: Be careful with logging levels in production as verbose logging may expose sensitive information
- Documentation: Document all command line arguments used in your deployment procedures
- Testing: Test command line arguments in development before using them in production
Common Deployment Patterns
Development
Staging
Production
These command line arguments provide flexibility in how you deploy and run Gigantics, allowing you to override specific settings without modifying configuration files.
Individual Command Documentation
For detailed information about each available command in Gigantics, see the individual command documentation:
- Start Command - Start the Gigantics server
- Stop Command - Stop Gigantics services
- User Management - Manage user accounts
- Process Status - List running services
- Debaser - Debaser CLI engine
- Migration - Database migration command
- Restart - Restart Gigantics server
- Version - Print Gigantics version