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.
Pull Request
docker-compose.yml
file in.docker
directory to help bootstrap all the services used by nautilus systemMakefile
targetinstall-cli
that build and installnautilus
CLI executabledocs/developer_guide/environment_setup.md
with documentation around running services withdocker-compose
, how to build and usenautilus
cli, and which commands are currently implementedcli
rust crate that contains Rust CLI design with target commandsbuild.rs
warning when runninginstall-cli
by conditionally importing std env based on FFI feature (to suppress warnings)schema/tables.sql
that is being heavy developedDemo
Steps to reproduce and try
Services
You can use
docker-compose.yml
file located in.docker
directoryto bootstrap the Nautilus working environment. This will start the following services:
If you only want specific services running (like
postgres
for example), you can start them with command:Used services are:
postgres
- Postgres database with root userPOSTRES_USER
which defaults topostgres
,POSTGRES_PASSWORD
which defaults topass
andPOSTGRES_DB
which defaults topostgres
redis
- Redis serverpgadmin
- PgAdmin4 for database management and administrationAfter you have long as
postgres
administrator, runCREATE DATABASE
command with target name( we usenautilus
):Nautilus CLI Developer Guide
Introduction
The Nautilus CLI is a command-line interface tool designed to interact
with the Nautilus Trader ecosystem. It provides commands for managing the Postgres database and other trading operations.
Install
You can install nautilus cli command with from Make file target, which will use
cargo install
under the hood.And this command will install
nautilus
bin executable in your path if Rustcargo
is properly configured.Commands
You can run
nautilus --help
to inspect structure of CLI and groups of commands:Database
These are commands related to the bootstrapping the Postgres database.
For that you work, you need to supply right connection configuration. You can do that through
command line arguments or
.env
file in the root directory or where the commands is being run.--host
arg orPOSTGRES_HOST
for database host--port
arg orPOSTGRES_PORT
for database port--user
arg orPOSTGRES_USER
for root administrator user to run command with (namelypostgres
root user here)--password
arg orPOSTGRES_PASSWORD
for root administrator password--database
arg orPOSTGRES_DATABASE
for both database name and new user that will have privileges of this database( if you provided
nautilus
as value, then new user will be created with namenautilus
that will inherit the password fromPOSTGRES_PASSWORD
and
nautilus
database with be bootstrapped with this user as owner)Example of
.env
fileList of commands are:
nautilus database init
- it will bootstrap schema, roles and all sql files located inschema
root directory (liketables.sql
)nautilus database drop
- it will drop all tables, role and data in target Postgres database