From 44df0dcf61c29820a1e4d2756249f4ded15a6238 Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Fri, 19 Apr 2024 09:58:16 +0200 Subject: [PATCH] project setup for docker development - mount config and dependencies locally --- README.md | 5 +---- docker-compose-dev.yml | 12 +++++++++++- docs/development.md | 5 +---- package.json | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3d94617..bcfc132 100644 --- a/README.md +++ b/README.md @@ -112,10 +112,7 @@ docker compose -f docker-compose-dev.yml up ``` Once everything is ready visit: [http://localhost:8080](http://localhost:8080) and login as admin/admin123, Ctrl+c to stop. -If you're tweaking dependencies then you must rebuild with: -``` -docker compose -f docker-compose-dev.yml up --build -``` +See `docker-compose-dev.yml` for more informations about configurations and dependencies. ## Project setup for development (Linux) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 15b09ef..bea21c4 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -7,6 +7,16 @@ services: - "8080:8080" # frontend port, see package.json - "8081:8081" # backend port, see package.json and .env.local volumes: + # mount code: - ./frontend:/var/www/filegator/frontend - ./backend:/var/www/filegator/backend - #- ./configuration.php:/var/www/filegator/frontend/configuration.php \ No newline at end of file + # mount custom configuration (create configuration.php file first): + #- ./configuration.php:/var/www/filegator/configuration.php + # mount php dependencies locally: + #- ./vendor:/var/www/filegator/vendor + #- ./composer.json:/var/www/filegator/composer.json + #- ./composer.lock:/var/www/filegator/composer.lock + # mount node dependencies locally: + #- ./node_modules:/var/www/filegator/node_modules + #- ./package.json:/var/www/filegator/package.json + #- ./package-lock.json:/var/www/filegator/package-lock.json \ No newline at end of file diff --git a/docs/development.md b/docs/development.md index 81310d0..c12b1cf 100644 --- a/docs/development.md +++ b/docs/development.md @@ -11,10 +11,7 @@ docker compose -f docker-compose-dev.yml up ``` Once everything is ready visit: [http://localhost:8080](http://localhost:8080) and login as admin/admin123, Ctrl+c to stop. -If you're tweaking dependencies then you must rebuild with: -``` -docker compose -f docker-compose-dev.yml up --build -``` +See `docker-compose-dev.yml` for more informations about configurations and dependencies. ## Project setup for development (Linux) diff --git a/package.json b/package.json index 81521b9..4187bf5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "concurrently \"php -S 0.0.0.0:8081\" \"vue-cli-service serve --port 8080\"", + "serve": "composer install && npm i && concurrently \"php -S 0.0.0.0:8081\" \"vue-cli-service serve --port 8080\"", "build": "vue-cli-service build --no-clean", "test:unit": "vue-cli-service test:unit", "test:e2e": "vue-cli-service test:e2e --headless",