From 4070c63db6f3750164822148243c3b010350bece Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 8 Jun 2024 11:40:20 +0400 Subject: [PATCH] update docker configure --- docker-compose.yml | 4 +++- vite.config.js | 38 ++++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c1b4c606e..2c3f45a16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,6 +20,8 @@ services: dockerfile: Dockerfile.dev volumes: - .:/app:delegated + ports: + - 5173:5173 command: ["make", "start-frontend"] database: @@ -29,7 +31,7 @@ services: ports: - 54320:5432 volumes: - - hexlet-sicp-pgdata:/var/lib/postgresql/data + - hexlet-sicp-pgdata:/var/lib/postgresql/data volumes: hexlet-sicp-pgdata: diff --git a/vite.config.js b/vite.config.js index 014b47bad..ff7391353 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,24 +3,30 @@ import laravel from 'laravel-vite-plugin'; import react from '@vitejs/plugin-react'; export default defineConfig({ - plugins: [ - laravel({ - input: [ - 'resources/js/app.js', - 'resources/js/custom.js', - 'resources/js/hljs.js', - 'resources/js/editor.js', - 'resources/sass/app.scss', - 'resources/sass/_activity_chart.scss', - 'resources/sass/_custom.scss', - ], - refresh: true, - }), - react(), + server: { + host: '0.0.0.0', + hmr: { + host: 'localhost', + }, + }, + plugins: [ + laravel({ + input: [ + 'resources/js/app.js', + 'resources/js/custom.js', + 'resources/js/hljs.js', + 'resources/js/editor.js', + 'resources/sass/app.scss', + 'resources/sass/_activity_chart.scss', + 'resources/sass/_custom.scss', + ], + refresh: true, + }), + react(), - ], + ], build: { outDir: 'public/build', emptyOutDir: false, - } + }, });