|
1 | 1 | { |
2 | 2 | "version": "2.0.0", |
3 | 3 | "tasks": [ |
4 | | - // Logging |
| 4 | + // Docker |
| 5 | + // Logging |
5 | 6 | { |
6 | 7 | "label": "Logs: librebooking (docker)", |
7 | 8 | "command": "docker compose --file docker-compose-local.yml logs app -f", |
8 | 9 | "type": "shell", |
9 | 10 | "options": { |
10 | 11 | "cwd": "${workspaceFolder}/.examples/docker", |
11 | | - "env": { |
12 | | - "DOCKER_HOST": "unix:///run/docker.sock" // Sometimes the tasks shell doesnt inherit .bashrc DOCKER_HOST, neither the docker context |
| 12 | + "shell": { |
| 13 | + "executable": "bash", |
| 14 | + "args": ["-i", "-c"] |
13 | 15 | } |
14 | 16 | }, |
15 | 17 | "presentation": { |
|
23 | 25 | "type": "shell", |
24 | 26 | "options": { |
25 | 27 | "cwd": "${workspaceFolder}/.examples/docker", |
26 | | - "env": { |
27 | | - "DOCKER_HOST": "unix:///run/docker.sock" |
| 28 | + "shell": { |
| 29 | + "executable": "bash", |
| 30 | + "args": ["-i", "-c"] |
28 | 31 | } |
29 | 32 | }, |
30 | 33 | "presentation": { |
|
38 | 41 | "type": "shell", |
39 | 42 | "options": { |
40 | 43 | "cwd": "${workspaceFolder}/.examples/docker", |
41 | | - "env": { |
42 | | - "DOCKER_HOST": "unix:///run/docker.sock" |
| 44 | + "shell": { |
| 45 | + "executable": "bash", |
| 46 | + "args": ["-i", "-c"] |
43 | 47 | } |
44 | 48 | }, |
45 | 49 | "presentation": { |
|
66 | 70 | "type": "shell", |
67 | 71 | "options": { |
68 | 72 | "cwd": "${workspaceFolder}/.examples/docker", |
69 | | - "env": { |
70 | | - "DOCKER_HOST": "unix:///run/docker.sock" |
| 73 | + "shell": { |
| 74 | + "executable": "bash", |
| 75 | + "args": ["-i", "-c"] |
71 | 76 | } |
72 | 77 | }, |
73 | 78 | "presentation": { |
|
78 | 83 | // Booting |
79 | 84 | { |
80 | 85 | "label": "Hard Restart: all (docker)", |
81 | | - "command": "docker compose --file docker-compose-local.yml down --remove-orphans && docker compose --file docker-compose-local.yml up -d ", |
| 86 | + "command": "docker compose --file docker-compose-local.yml down --remove-orphans && docker compose --file docker-compose-local.yml up -d --pull always", |
| 87 | + "type": "shell", |
82 | 88 | "options": { |
83 | 89 | "cwd": "${workspaceFolder}/.examples/docker", |
84 | | - "env": { |
85 | | - "DOCKER_HOST": "unix:///run/docker.sock" |
| 90 | + "shell": { |
| 91 | + "executable": "bash", |
| 92 | + "args": ["-i", "-c"] |
86 | 93 | } |
87 | | - }, |
88 | | - "type": "shell" |
| 94 | + } |
89 | 95 | }, |
90 | 96 | { |
91 | 97 | "label": "Start: all (docker)", |
92 | 98 | "command": "docker compose --file docker-compose-local.yml up -d", |
| 99 | + "type": "shell", |
93 | 100 | "options": { |
94 | 101 | "cwd": "${workspaceFolder}/.examples/docker", |
95 | | - "env": { |
96 | | - "DOCKER_HOST": "unix:///run/docker.sock" |
| 102 | + "shell": { |
| 103 | + "executable": "bash", |
| 104 | + "args": ["-i", "-c"] |
97 | 105 | } |
98 | | - }, |
99 | | - "type": "shell" |
| 106 | + } |
100 | 107 | }, |
101 | 108 | { |
102 | 109 | "label": "Stop: all (docker)", |
103 | 110 | "command": "docker compose --file docker-compose-local.yml down --remove-orphans", |
| 111 | + "type": "shell", |
104 | 112 | "options": { |
105 | 113 | "cwd": "${workspaceFolder}/.examples/docker", |
106 | | - "env": { |
107 | | - "DOCKER_HOST": "unix:///run/docker.sock" |
| 114 | + "shell": { |
| 115 | + "executable": "bash", |
| 116 | + "args": ["-i", "-c"] |
108 | 117 | } |
| 118 | + } |
| 119 | + }, |
| 120 | + // Logging (podman) |
| 121 | + { |
| 122 | + "label": "Logs: librebooking (podman)", |
| 123 | + "command": "journalctl --user -u app -f", |
| 124 | + "type": "shell", |
| 125 | + "presentation": { |
| 126 | + "reveal": "always", |
| 127 | + "panel": "new" |
| 128 | + } |
| 129 | + }, |
| 130 | + { |
| 131 | + "label": "Logs: db (podman)", |
| 132 | + "command": "journalctl --user -u db -f", |
| 133 | + "type": "shell", |
| 134 | + "presentation": { |
| 135 | + "reveal": "always", |
| 136 | + "panel": "new" |
| 137 | + } |
| 138 | + }, |
| 139 | + { |
| 140 | + "label": "Logs: cron (podman)", |
| 141 | + "command": "journalctl --user -u cron -f", |
| 142 | + "type": "shell", |
| 143 | + "presentation": { |
| 144 | + "reveal": "always", |
| 145 | + "panel": "new" |
| 146 | + } |
| 147 | + }, |
| 148 | + { |
| 149 | + "label": "Logs:all", |
| 150 | + "dependsOn": [ |
| 151 | + "Logs:librebooking", |
| 152 | + "Logs:db", |
| 153 | + ], |
| 154 | + "presentation": { |
| 155 | + "reveal": "always", |
| 156 | + "panel": "dedicated" |
109 | 157 | }, |
| 158 | + "problemMatcher": [] |
| 159 | + }, |
| 160 | + { |
| 161 | + "label": "Status: all (podman)", |
| 162 | + "command": "systemctl --user status app db", |
| 163 | + "type": "shell", |
| 164 | + "presentation": { |
| 165 | + "reveal": "always", |
| 166 | + "panel": "new" |
| 167 | + } |
| 168 | + }, |
| 169 | + // Booting (podman) |
| 170 | + { |
| 171 | + "label": "Restart: all (podman)", |
| 172 | + "command": "${workspaceFolder}/scripts/restart", |
| 173 | + "type": "shell", |
| 174 | + "options": { |
| 175 | + "cwd": "${workspaceFolder}/scripts" |
| 176 | + } |
| 177 | + }, |
| 178 | + { |
| 179 | + "label": "Start: all (podman)", |
| 180 | + "command": "${workspaceFolder}/scripts/start", |
110 | 181 | "type": "shell" |
111 | | - } |
| 182 | + }, |
| 183 | + { |
| 184 | + "label": "Stop: all (podman)", |
| 185 | + "command": "${workspaceFolder}/scripts/stop", |
| 186 | + "type": "shell" |
| 187 | + }, |
112 | 188 | ] |
113 | 189 | } |
0 commit comments