From 7b0d708a2fcdebd4d3e2de19f636373bb23e5850 Mon Sep 17 00:00:00 2001 From: "yassin@siouda.com" Date: Wed, 11 Oct 2023 17:15:26 +0200 Subject: [PATCH] chore(docker): volume mapping for dev --- README.md | 15 ++++++++++++++- docker-compose.yml | 10 ++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cbfe98f..04805d0 100644 --- a/README.md +++ b/README.md @@ -52,4 +52,17 @@ The `tauri` version is only here to quickstart future developments but nothing `docker compose --profile prod up` ### Build and run the dev image -`docker compose --profile dev up` \ No newline at end of file + +**First installation** +First you need to map node_modules to your local machine for your ide intellisense to work properly +```bash +docker compose --profile dev up -d +docker cp topos-dev:/app/node_modules . +docker compose --profile dev down +``` + +**Then** +```bash +docker compose --profile dev up +``` + diff --git a/docker-compose.yml b/docker-compose.yml index 1632b74..0021919 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,16 @@ services: build: context: . target: "dev" + volumes: + - ./src:/app/src + - ./fonts:/app/fonts + - ./img:/app/img + - ./package.json:/app/package.json + - ./postcss.config.js:/app/postcss.config.js + - ./tailwind.config.js:/app/tailwind.config.js + - ./tsconfig.json:/app/tsconfig.json + - ./vite.config.js:/app/vite.config.js + - ./yarn.lock:/app/yarn.lock ports: - "8000:8000" topos-prod: