From b557f42daac6c163394cfc2129fb2988e0a162a0 Mon Sep 17 00:00:00 2001 From: Alexander Minkin Date: Tue, 29 Oct 2024 22:11:06 +0300 Subject: [PATCH] build: add additional compose file for devs --- install/automated/docker/Readme.md | 6 ++++++ .../automated/docker/docker-compose.dev.yml | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 install/automated/docker/docker-compose.dev.yml diff --git a/install/automated/docker/Readme.md b/install/automated/docker/Readme.md index bfd01268..558d2270 100644 --- a/install/automated/docker/Readme.md +++ b/install/automated/docker/Readme.md @@ -47,3 +47,9 @@ Start is simple as `docker compose up -d`. You can also use `docker compose up` - OpenVK will be available at `http://localhost:8080/`. - PHPMyAdmin will be available at `http://localhost:8081/`. - Adminer will be available at `http://localhost:8082/`. + +### Running in development environment +By using additional `docker-compose.dev.yml` file you can develop OpenVK in Docker with automatic updates as you edit and save your code. Simply run: +``` +docker compose -f docker-compose.yml -f docker-compose.dev.yml up --watch +``` diff --git a/install/automated/docker/docker-compose.dev.yml b/install/automated/docker/docker-compose.dev.yml new file mode 100644 index 00000000..68338dcd --- /dev/null +++ b/install/automated/docker/docker-compose.dev.yml @@ -0,0 +1,20 @@ +services: + openvk: + build: + context: ../../.. + dockerfile: install/automated/docker/openvk.Dockerfile + develop: + watch: + - path: ../../.. + action: sync + target: /opt/chandler/extensions/available/openvk + ignore: + - vendor/ + - path: ../../../composer.json + action: rebuild + - path: ../../../composer.lock + action: rebuild + - path: ../../../Web/static/js/package-lock.json + action: rebuild + - path: ../../../Web/static/js/package.json + action: rebuild \ No newline at end of file