From 2d1f2ff12861b2a35bc25845757d194b9056d791 Mon Sep 17 00:00:00 2001 From: ajikamaludin Date: Thu, 16 Mar 2023 07:42:29 +0700 Subject: [PATCH] add npm run on docker compose --- docker-compose.yml | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 170c64b..0fb6681 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,6 +40,15 @@ services: networks: template: ipv4_address: 10.8.0.99 + nodejs: + image: node:16-alpine + container_name: template-node + ports: + - 5173:5173 + volumes: + - ./:/var/www + working_dir: /var/www + entrypoint: ["npm","run", "dev"] volumes: templatedb: diff --git a/package.json b/package.json index 9c1eaae..f89f1cd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "scripts": { - "dev": "vite", + "dev": "vite --host 0.0.0.0", "build": "vite build" }, "devDependencies": {