diff --git a/compose.yml b/compose.yml index f3d7d0bc4..6b54d9d02 100644 --- a/compose.yml +++ b/compose.yml @@ -48,10 +48,8 @@ services: ports: - "${VUE_PORT:-8080}:${VUE_PORT:-8080}" environment: - - HOST - VUE_PORT volumes: - - "../ui:/ui" - "./front:/app" - "/app/node_modules" networks: diff --git a/front/Dockerfile.dev b/front/Dockerfile.dev index ddb5b1428..627f7d2f9 100644 --- a/front/Dockerfile.dev +++ b/front/Dockerfile.dev @@ -1,9 +1,19 @@ FROM node:22-alpine # needed to compile translations -RUN apk add --no-cache jq bash coreutils python3 +RUN apk add --no-cache jq bash coreutils git python3 -EXPOSE 8080 WORKDIR /app/ -CMD yarn && yarn dev --host \ No newline at end of file +# Create node_modules directory to prevent it from being hidden by volume mounts +RUN mkdir -p node_modules + +ADD scripts/ ./scripts/ +ADD package.json yarn.lock ./ +RUN yarn + +VOLUME /app +VOLUME /app/node_modules +EXPOSE 8080 + +CMD ["yarn", "dev", "--host"] diff --git a/front/package.json b/front/package.json index 03ad8145c..5f8916c55 100644 --- a/front/package.json +++ b/front/package.json @@ -18,6 +18,7 @@ "postinstall": "yarn run fix-fomantic-css" }, "dependencies": { + "@funkwhale/ui": "^0.3.0", "@sentry/tracing": "7.47.0", "@sentry/vue": "7.47.0", "@tauri-apps/api": "2.0.0-beta.1", @@ -66,7 +67,6 @@ }, "devDependencies": { "@faker-js/faker": "8.4.1", - "@funkwhale/ui": "file:/ui", "@iconify/vue": "4.1.1", "@intlify/eslint-plugin-vue-i18n": "2.0.0", "@intlify/unplugin-vue-i18n": "2.0.0", diff --git a/front/vite.config.ts b/front/vite.config.ts index a6a138540..d1e11ed24 100644 --- a/front/vite.config.ts +++ b/front/vite.config.ts @@ -59,9 +59,6 @@ export default defineConfig(({ mode }) => ({ ], server: { port: +(process.env.VUE_PORT ?? 8080), - hmr: { - clientPort: +(process.env.VUE_PORT ?? 8080) - }, watch: { usePolling: true, } diff --git a/front/yarn.lock b/front/yarn.lock index 936610f0a..ba163ddd8 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -1855,8 +1855,10 @@ resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-8.4.1.tgz#5d5e8aee8fce48f5e189bf730ebd1f758f491451" integrity sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg== -"@funkwhale/ui@file:../ui": +"@funkwhale/ui@^0.3.0": version "0.3.0" + resolved "https://registry.yarnpkg.com/@funkwhale/ui/-/ui-0.3.0.tgz#d0f530d8ccb004e3d4b8c617e986136f4c3d723d" + integrity sha512-44IPYq1Pj7rifqEWKtUj30PO4mrkdAo4k0xA7PspKCZJR2PcSEd0fZTDr2tvnBYQDblavHoYcZNvB1IZQMGhOw== dependencies: dompurify "^2.4.3 || ^3.0.0" showdown "^2.1.0"