-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlube
More file actions
executable file
·54 lines (46 loc) · 1.13 KB
/
lube
File metadata and controls
executable file
·54 lines (46 loc) · 1.13 KB
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
51
52
53
54
#!/bin/bash
# entry fdc97cf0: Installation instructions for Docker and LubeLogger
# |
#
# These steps assume Docker is already installed, such is the case with Aran
#
# 1. pacman -S docker-compose
# 2. mkdir ~/src/lubelogger
# 3. cd ~/src/lubelogger
# 4. create .env file according to LubeLogger docs
# 5. copy https://github.com/hargata/lubelog/blob/main/docker-compose.yml
# 6. sudo systemctl start docker
# 7. sudo docker pull ghcr.io/hargata/lubelogger:latest
# 8. docker compose up -d
# 9. firefox localhost:8080
DATA="$AUTOKNIGHT_DIR" # ~/nexus/auto
BROWSER='firefox'
BROWSER_OPTS='--new-window'
PORT=8080
URL="localhost:$PORT"
IMAGE_URL="ghcr.io/hargata/lubelogger:latest" # for sudo docker pull <IMAGE_URL>
main(){
run_docker_daemon
# grab_sudo_permission
launch_browser &
start_container
}
#FIXME
grab_sudo_permission(){
sudo echo "Permission granted"
}
run_docker_daemon(){
sudo systemctl start docker
}
start_container(){
cd "$DATA"
sudo docker compose up
}
# FIXME: bad practices
launch_browser(){
sleep 2
$BROWSER "$BROWSER_OPTS" "$URL"
sleep 3
wmctrl -r "LubeLogger" -b toggle,maximized_vert,maximized_horz
}
main