diff --git a/Dockerfile b/Dockerfile index 7765d2ca..c08971b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # develop stage -FROM node:current-alpine as develop-stage +FROM node:18-alpine as develop-stage WORKDIR /app COPY package*.json ./ RUN npm install -g @quasar/cli @@ -9,7 +9,7 @@ FROM develop-stage as build-stage RUN npm install RUN quasar build # production stage -FROM nginx:1.17.5-alpine as production-stage +FROM nginx:1.23.2-alpine as production-stage COPY --from=build-stage /app/dist/spa /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index 50956a61..f08a878a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.7' services: - quasar-dev: + tachideskvui-dev: build: context: . target: 'develop-stage' @@ -10,9 +10,11 @@ services: volumes: - '.:/app' command: /bin/sh -c "npm i && quasar dev" + restart: unless-stopped - quasar-prod: + tachideskvui-prod: build: context: . ports: - '9013:80' + restart: unless-stopped diff --git a/quasar.config.js b/quasar.config.js index cb65c48c..414e8362 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -157,12 +157,12 @@ module.exports = configure(function (/* ctx */) { // extendSSRWebserverConf (esbuildConf) {}, // extendPackageJson (json) {}, - pwa: false, + pwa: true, // manualStoreHydration: true, // manualPostHydrationTrigger: true, - prodPort: 3000, // The default port that the production server should use + prodPort: 80, // The default port that the production server should use // (gets superseded if process.env.PORT is specified at runtime) middlewares: [ diff --git a/src/boot/StoreDefaults.ts b/src/boot/StoreDefaults.ts index 95dd42d9..9ca501ae 100644 --- a/src/boot/StoreDefaults.ts +++ b/src/boot/StoreDefaults.ts @@ -5,10 +5,6 @@ if (LocalStorage.isEmpty()) { LocalStorage.set('useCache', true); LocalStorage.set('MitemW', 300); LocalStorage.set('dark', true); + LocalStorage.set('ExtLangFilt', ['en']); Dark.set(true); - // LocalStorage.set('', ''); - // LocalStorage.set('', ''); - // LocalStorage.set('', ''); - // LocalStorage.set('', ''); - // LocalStorage.set('', ''); } diff --git a/src/components/downloads/useDlSock.ts b/src/components/downloads/useDlSock.ts index e7e00bb8..28c75b87 100644 --- a/src/components/downloads/useDlSock.ts +++ b/src/components/downloads/useDlSock.ts @@ -5,7 +5,8 @@ const eventsFromServer = ref(''); const isConnected = ref(false); let base = LocalStorage.getItem('baseUrl') as string; base = - base == '/' ? document.location.origin + document.location.pathname : base; + base == '' ? document.location.origin + document.location.pathname : base; +console.log(base); const url = new URL(base); url.protocol = url.protocol == 'https:' ? 'wss:' : 'ws:'; let socket: WebSocket; diff --git a/src/router/index.ts b/src/router/index.ts index 3f78bd54..fb838ff5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -18,6 +18,20 @@ import routes from './routes'; */ export default route(function (/* { store, ssrContext } */) { + // i honistly dont know the proper fix for this + if (window.process == undefined) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + window.process = { + env: { + SERVER: '', + NODE_ENV: '', + VUE_ROUTER_MODE: 'hash', + VUE_ROUTER_BASE: '/' + } + }; + } + const createHistory = process.env['SERVER'] ? createMemoryHistory : process.env.VUE_ROUTER_MODE === 'history' @@ -34,6 +48,7 @@ export default route(function (/* { store, ssrContext } */) { // Leave this as is and make changes in quasar.conf.js instead! // quasar.conf.js -> build -> vueRouterMode // quasar.conf.js -> build -> publicPath + history: createHistory(process.env.VUE_ROUTER_BASE) });