diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..800c9ef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM node:20-slim + +COPY . /app +WORKDIR /app +RUN npm ci diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a7142a2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +services: + base: &base + build: + context: . + dockerfile: Dockerfile + volumes: + - .:/app + working_dir: /app + http_server: + <<: *base + ports: + - 127.0.0.1:5173:5173 + command: npm run dev + style_watcher: + <<: *base + command: npm run watch-style diff --git a/package.json b/package.json index b653070..29d1ab1 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite --host", "build": "tsc && vite build", "build-style": "npx charites build styles/charites-ai/style.yml public/style.json", "watch-style": "npx charites build -w styles/charites-ai/style.yml public/style.json",