-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yml
More file actions
60 lines (49 loc) · 1.76 KB
/
taskfile.yml
File metadata and controls
60 lines (49 loc) · 1.76 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
55
56
57
58
59
version: "3"
dotenv: [".env"]
vars:
WORKSPACE: .
SESSION: dev
CONTAINER_NAME: teaclave-storm
TUNNEL_SRV: sws01
TUNNEL_USER: luca
SSH_TUNNEL_REMOTE_PORT: 2222
NVIM_TUNNEL_REMOTE_PORT: 6666
SSH_TUNNEL_LOCAL_PORT: 8022
NVIM_TUNNEL_LOCAL_PORT: 8066
tasks:
devcontainer:
desc: Build, start, and attach to the devcontainer
cmds:
- task: devcontainer-build
- task: devcontainer-up
- task: devcontainer-attach
devcontainer-recreate:
desc: Recreates a devcontainer from scratch to ensure a clean environment
cmds:
- task: devcontainer-down
- task: devcontainer
devcontainer-build:
desc: Build the devcontainer image for this workspace
cmds:
- devcontainer build --workspace-folder {{.WORKSPACE}}
devcontainer-up:
desc: Start (or reuse) the devcontainer for this workspace
cmds:
- devcontainer up --workspace-folder {{.WORKSPACE}}
devcontainer-attach:
desc: Exec into the devcontainer and start/attach tmux
cmds:
- devcontainer exec --workspace-folder {{.WORKSPACE}} tmux new-session -A -s {{.SESSION}}
devcontainer-down:
desc: Stop and remove the devcontainer for this workspace
cmds:
- docker stop {{.CONTAINER_NAME}} || true
- docker rm -f -v {{.CONTAINER_NAME}} || true
tunnel-ssh:
desc: Expose the devcontainer’s SSH port locally so you can connect via SSH without extra steps
cmds:
- ssh -N -L {{.SSH_TUNNEL_LOCAL_PORT}}:127.0.0.1:{{.SSH_TUNNEL_REMOTE_PORT}} {{.TUNNEL_USER}}@{{.TUNNEL_SRV}}
tunnel-nvim:
desc: Forward the devcontainer’s Neovim headless server port to your machine for remote-UI access
cmds:
- ssh -N -L {{.NVIM_TUNNEL_LOCAL_PORT}}:127.0.0.1:{{.NVIM_TUNNEL_REMOTE_PORT}} {{.TUNNEL_USER}}@{{.TUNNEL_SRV}}