tmorgan497
tmorgan497
Explore posts from servers
NNuxt
Created by tmorgan497 on 6/13/2024 in #❓・help
High CPU Usage in Docker when running Nuxt in dev
Tested on NixOS. I don't get the same issue with high CPU usage. Maybe it's a Windows issue only. I'll try to rule out an issue with my own machine by running it on another Windows machine when I get a chance. https://github.com/nuxt/nuxt/issues/27617#issuecomment-2173371370
6 replies
NNuxt
Created by tmorgan497 on 6/13/2024 in #❓・help
High CPU Usage in Docker when running Nuxt in dev
I created a new issue on the nuxt github. https://github.com/nuxt/nuxt/issues/27617
6 replies
NNuxt
Created by tmorgan497 on 6/13/2024 in #❓・help
High CPU Usage in Docker when running Nuxt in dev
I may have narrowed it down to chokidar. When i comment out the environment variable CHOKIDAR_USEPOLLING=true, the CPU usage goes down to a normal level (under 1%). IIRC, chokidar is used for HMR, so I usually leave it active during development so I don't have to restart the container everytime I make a change. Any thoughts on how to reduce its CPU usage? I added a watcher ignore param to my nuxt.config.ts, but it doesn't seem to do anything to help reduce the CPU usage.
watchers: {
webpack: {
ignored: /node_modules/
}
},
watchers: {
webpack: {
ignored: /node_modules/
}
},
6 replies
NNuxt
Created by tmorgan497 on 6/13/2024 in #❓・help
High CPU Usage in Docker when running Nuxt in dev
Here's a minimal app with docker that reproduces the issue: https://github.com/tmorgan497/minimal-nuxt-docker
6 replies
NNuxt
Created by tmorgan497 on 6/13/2024 in #❓・help
High CPU Usage in Docker when running Nuxt in dev
and my nuxt.config.ts:
import * as path from 'path';
const auraPath = path.join(__dirname, 'pv-presets', 'aura').replace(/\\/g, '/');

export default defineNuxtConfig({
devtools: { enabled: true },
ssr: false,
watchers: {
webpack: {
ignored: /node_modules/
}
},

css: [
'~/assets/css/main.css',
],

typescript: {
includeWorkspace: true
},

postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},

modules: [
'nuxt-icon',
'@nuxtjs/tailwindcss',
'@vueuse/nuxt',
'nuxt-primevue',
'@pinia/nuxt',
'@pinia-plugin-persistedstate/nuxt',
],

primevue: {
options: { unstyled: true, ripple: true },
importPT: { as: 'Aura', from: auraPath },
components: {
// prefix: 'P',
exclude: ['Editor', 'Chart']
}
},
})
import * as path from 'path';
const auraPath = path.join(__dirname, 'pv-presets', 'aura').replace(/\\/g, '/');

export default defineNuxtConfig({
devtools: { enabled: true },
ssr: false,
watchers: {
webpack: {
ignored: /node_modules/
}
},

css: [
'~/assets/css/main.css',
],

typescript: {
includeWorkspace: true
},

postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},

modules: [
'nuxt-icon',
'@nuxtjs/tailwindcss',
'@vueuse/nuxt',
'nuxt-primevue',
'@pinia/nuxt',
'@pinia-plugin-persistedstate/nuxt',
],

primevue: {
options: { unstyled: true, ripple: true },
importPT: { as: 'Aura', from: auraPath },
components: {
// prefix: 'P',
exclude: ['Editor', 'Chart']
}
},
})
6 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
Which version is more secure: adding a server-side route to immich, or adding addresses to Access-Control-Allow-Origin?
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
Makes sense. Thanks again!
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
Well just to test it, I added another nginx layer by spinning up a dedicated nginx container and adding the add_header 'Access-Control-Allow-Origin' '*' to it and it seems to work now. This will work for now since I'm already using nginx for other apps too. Although, I don't really know how secure this method is, but since I'm doing most everything over Tailscale, maybe it doesn't matter 🤷‍♂️. @ddshd thank you for helping me diagnose this!
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
No description
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
Unfortunately it did not. It's just weird because I can make API calls from postman on my local PC without issue, but when I make API calls from my quasar app (also running from my local PC) I get the CORS error.
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
yes. I hardcoded the host:port in default.conf.template because I was still getting errors where it was saying host not found in upstream
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
Yeah, unfortunately I get the same errors when I force recreate and rebuild the images. I even tried starting a fresh immich stack up with the new nginx settings and got the same error.
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
When I do that, I get errors in the immich-proxy container:
2023/09/17 20:34:24 [emerg] 1#1: host not found in upstream "${IMMICH_SERVER_HOST}" in /etc/nginx/conf.d/default.conf:15

nginx: [emerg] host not found in upstream "${IMMICH_SERVER_HOST}" in /etc/nginx/conf.d/default.conf:15
2023/09/17 20:34:24 [emerg] 1#1: host not found in upstream "${IMMICH_SERVER_HOST}" in /etc/nginx/conf.d/default.conf:15

nginx: [emerg] host not found in upstream "${IMMICH_SERVER_HOST}" in /etc/nginx/conf.d/default.conf:15
Do I need to explicitly set those env variables?
32 replies
IImmich
Created by tmorgan497 on 9/16/2023 in #help-desk-support
CORS help for API requests
I'm inexperienced with rebuilding docker images. Is there any documentation on how the build process for the immich docker image works?
32 replies