Docker (5 seconds)
Latest release version: 0.7.1​
When running on docker, the --publish {{hostport}}:{{containerport}} and the ---port flag must be the same. Like the example below, all 3 ports are 5678: --publish 5678:5678 --port 5678
$ docker run --init --name bytebase --restart always --add-host host.docker.internal:host-gateway --publish 5678:5678 --volume ~/.bytebase/data:/var/opt/bytebase bytebase/bytebase:<<version>> --data /var/opt/bytebase --host http://localhost --port 5678

Run on localhost:8080

$ docker run --init --name bytebase --restart always --add-host host.docker.internal:host-gateway --publish 8080:8080 --volume ~/.bytebase/data:/var/opt/bytebase bytebase/bytebase:0.7.1 --data /var/opt/bytebase --host http://localhost --port 8080
Bytebase will then start on http://localhost:8080 and store its data under ~/.bytebase/data (Check Server Startup Options for other startup options).
Open http://localhost:8080 in you browser and create the admin account.
Bytebase has already prepared some sample data. In particular, it has created a Test environment and a Prod environment, each containing a mysql instance. To establish the connection to those instances, one quick way is to start a MySQL docker instance.

Run on https://bytebase.example.com

For production setup, you need to make sure --host, --port match exactly to the host:port address where Bytebase supposed to be visited. Please check Production Setup for more advice.
$ docker run --init --name bytebase --restart always --add-host host.docker.internal:host-gateway --publish 80:80 --volume ~/.bytebase/data:/var/opt/bytebase bytebase/bytebase:0.7.1 --data /var/opt/bytebase --host https://bytebase.example.com --port 80

Start a local MySQL server for testing

Run MySQL inside Docker

The setup below is for testing purpose and should NOT be used in production setup. Also the mysql data will be wiped out after the container stops.
1
docker run --name mysqld --publish 3306:3306 -e MYSQL_ROOT_HOST=172.17.0.1 -e MYSQL_ROOT_PASSWORD=testpwd1 mysql/mysql-server:8.0
Copied!
172.17.0.1 is the default docker gateway IP to allow connection from Bytebase. See the official MySQL docker doc.
If Bytebase is run by docker, then it will also access the MySQL container via 172.17.0.1. This means you need to set 172.17.0.1 as the host for the configured instance.

Run MySQL without Docker

You need to set host.docker.internal as the host for the configured instance.

Troubleshoot

$ docker logs bytebase
Normally you should see something like:
1
-----Config BEGIN-----
2
mode=release
3
host=http://example.com
4
port=8080
5
dsn=file:/var/opt/bytebase/bytebase.db
6
seedDir=seed/release
7
readonly=false
8
demo=false
9
debug=false
10
-----Config END-------
11
2021-07-07T16:56:02.812Z INFO store/sqlite.go:213 Apply database migration if needed...
12
2021-07-07T16:56:02.821Z INFO store/sqlite.go:220 Current schema version before migration: 1.1
13
2021-07-07T16:56:02.821Z INFO store/sqlite.go:247 Skip this migration file: migration/10001__init_schema.sql. The corresponding migration version 1.1 has already been applied.
14
2021-07-07T16:56:02.828Z INFO store/sqlite.go:255 Current schema version after migration: 1.1
15
2021-07-07T16:56:02.828Z INFO store/sqlite.go:263 Completed database migration.
16
​
17
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
18
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
19
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
20
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•
21
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
22
β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•
23
24
Version 0.1.0 has started at http://example.com:8080
Copied!
If Bytebase fails to start, the error message should appear on the console around there.
Last modified 2d ago