-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-dev.sh
executable file
·50 lines (39 loc) · 1.15 KB
/
run-dev.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
47
48
49
50
#!/bin/sh
set -e
# dev mode (ro); mount local source, XXX: also use latest sitefile entry.sh iso. built-in
sf_version=0.0.7-dev
#sf_version=0.0.7-test
#sf_version=latest
# r/o so don't touch git or npm
src_update=0
site_src=github.com/dotmpe/ok-lcars-sdk
site_repo=git@$site_src.git
site_ver=r0.0
gh_keyfile=~/.ssh/id_rsa
kbn=id_rsa
hostname=$(hostname)
hostnamef=$(hostname -f)
mkdir -p srv
ssh-keyscan github.com > srv/known_hosts
. ./lib.sh
volumes=
sf_sh_volumes
#volumes="$volumes --volume $(pwd -P)/srv/src:/src"
#volumes="$volumes --volume $(pwd -P)/srv/home:/home/treebox"
sf_dir=/srv/project-local/node-sitefile
test ! -e $sf_dir/.git ||
volumes="$volumes --volume $sf_dir/tools/docker/ubuntu/entry.sh:/usr/local/share/sitefile/entry.sh:ro"
set -x
docker run \
-d --name sf-ok-lcars-sdk-dev \
-h $hostname -e SITEFILE_HOST=$hostname \
-p 7011:7011 -e SITEFILE_PORT=7011 \
-e src_update=$src_update \
$volumes \
--volume $(realpath $gh_keyfile):/home/treebox/.ssh/$kbn \
--volume $(realpath ./srv/known_hosts):/home/treebox/.ssh/known_hosts \
--volume $(pwd -P):/src/$site_src:ro \
dotmpe/node-sitefile:$sf_version \
\
"$site_src"
# Id: