-
Notifications
You must be signed in to change notification settings - Fork 22
/
my-dolt.sh
48 lines (36 loc) · 1.01 KB
/
my-dolt.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
export DOLT_HOME=/root/workspace/dolt
mkdir -p $DOLT_HOME
mkdir -p $DOLT_HOME/server-conf
# Write config, see more: https://docs.dolthub.com/sql-reference/server/configuration
cat > $DOLT_HOME/server-conf/config.yaml << EOF
log_level: info
behavior:
read_only: false
autocommit: true
user:
name: root
password: "your-password"
listener:
host: localhost
port: 3306
max_connections: 100
read_timeout_millis: 28800000
write_timeout_millis: 28800000
performance:
query_parallelism: null
EOF
docker run -itd --restart=always \
--name my-dolt \
-p 23306:3306 \
-v $DOLT_HOME/server-conf:/etc/dolt/servercfg.d \
-v $DOLT_HOME/dolt-conf:/etc/dolt/doltcfg.d \
-v $DOLT_HOME/databases:/var/lib/dolt \
dolthub/dolt-sql-server:1.32.0
# Change config need restart the container...!
docker exec -it my-dolt /bin/bash
# Add config
dolt config --global --set user.name "jasonkayzk"
dolt config --global --set user.email "[email protected]"
dolt login # set creds
# Restart container
docker restart my-dolt