diff --git a/.examples/docker/docker-compose-local.yml b/.examples/docker/docker-compose-local.yml index f34a8d2..e8b3ecd 100644 --- a/.examples/docker/docker-compose-local.yml +++ b/.examples/docker/docker-compose-local.yml @@ -9,7 +9,7 @@ services: env_file: - db.env app: - image: librebooking/librebooking:4.1.0 + image: librebooking/librebooking:develop restart: always depends_on: - db @@ -20,7 +20,7 @@ services: env_file: - lb.env cron: - image: librebooking/librebooking:4.1.0 + image: librebooking/librebooking:develop restart: always user: root entrypoint: /usr/local/bin/cron.sh diff --git a/.examples/docker/docker-compose-public.yml b/.examples/docker/docker-compose-public.yml index f58bbfa..83e617a 100644 --- a/.examples/docker/docker-compose-public.yml +++ b/.examples/docker/docker-compose-public.yml @@ -36,7 +36,7 @@ services: - db_root_pwd - db_user_pwd lb1: - image: librebooking/librebooking:4.1.0 + image: librebooking/librebooking:develop restart: always depends_on: - db @@ -54,7 +54,7 @@ services: - lb_install_pwd - lb_user_pwd job1: - image: librebooking/librebooking:4.1.0 + image: librebooking/librebooking:develop restart: always depends_on: - lb1 @@ -67,7 +67,7 @@ services: secrets: - lb_user_pwd lb2: - image: librebooking/librebooking:4.1.0 + image: librebooking/librebooking:develop restart: always depends_on: - db @@ -85,7 +85,7 @@ services: - lb_install_pwd - lb_user_pwd job2: - image: librebooking/librebooking:4.1.0 + image: librebooking/librebooking:develop restart: always depends_on: - lb2 diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..762ccfe --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,113 @@ +{ + "version": "2.0.0", + "tasks": [ + // Logging + { + "label": "Logs: librebooking (docker)", + "command": "docker compose --file docker-compose-local.yml logs app -f", + "type": "shell", + "options": { + "cwd": "${workspaceFolder}/.examples/docker", + "env": { + "DOCKER_HOST": "unix:///run/docker.sock" // Sometimes the tasks shell doesnt inherit .bashrc DOCKER_HOST, neither the docker context + } + }, + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + { + "label": "Logs: db (docker)", + "command": "docker compose --file docker-compose-local.yml logs db -f", + "type": "shell", + "options": { + "cwd": "${workspaceFolder}/.examples/docker", + "env": { + "DOCKER_HOST": "unix:///run/docker.sock" + } + }, + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + { + "label": "Logs: cron (docker)", + "command": "docker compose --file docker-compose-local.yml logs cron -f", + "type": "shell", + "options": { + "cwd": "${workspaceFolder}/.examples/docker", + "env": { + "DOCKER_HOST": "unix:///run/docker.sock" + } + }, + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + { + "label": "Logs: all (docker)", + "dependsOn": [ + "Logs: librebooking (docker)", + "Logs: db (docker)", + "Logs: cron (docker)" + ], + "presentation": { + "reveal": "always", + "panel": "dedicated" + }, + "problemMatcher": [] + }, + { + "label": "Status: all (docker)", + "command": "docker compose --file docker-compose-local.yml ps app db cron", + "type": "shell", + "options": { + "cwd": "${workspaceFolder}/.examples/docker", + "env": { + "DOCKER_HOST": "unix:///run/docker.sock" + } + }, + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + // Booting + { + "label": "Hard Restart: all (docker)", + "command": "docker compose --file docker-compose-local.yml down --remove-orphans && docker compose --file docker-compose-local.yml up -d ", + "options": { + "cwd": "${workspaceFolder}/.examples/docker", + "env": { + "DOCKER_HOST": "unix:///run/docker.sock" + } + }, + "type": "shell" + }, + { + "label": "Start: all (docker)", + "command": "docker compose --file docker-compose-local.yml up -d", + "options": { + "cwd": "${workspaceFolder}/.examples/docker", + "env": { + "DOCKER_HOST": "unix:///run/docker.sock" + } + }, + "type": "shell" + }, + { + "label": "Stop: all (docker)", + "command": "docker compose --file docker-compose-local.yml down --remove-orphans", + "options": { + "cwd": "${workspaceFolder}/.examples/docker", + "env": { + "DOCKER_HOST": "unix:///run/docker.sock" + } + }, + "type": "shell" + } + ] +}