Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No files being created in /app/config #104

Open
samcro1967 opened this issue Aug 28, 2024 · 4 comments
Open

No files being created in /app/config #104

samcro1967 opened this issue Aug 28, 2024 · 4 comments
Assignees
Labels

Comments

@samcro1967
Copy link

No files are being created in /app/config. Every time the container is recreated I have to register as a new user. Not sure what I am missing. Below is the docker compose I am using. The directory does get created. It is owned by user 1000:1000 on the host and permissions have temporarily been set to 777 to rule them out as the issue.

  dweebui:
    hostname: dweebui
    image: lllllllillllllillll/dweebui:latest
    container_name: dweebui
    environment:
      - PORT=8000
      - SECRET=MrWiskers
      - HTTPS=false
    restart: unless-stopped
    ports:
      - 8093:8000
    volumes:
      - ${docker}/dweebui:/app/config
      - /var/run/docker.sock:/var/run/docker.sock
@lllllllillllllillll lllllllillllllillll self-assigned this Aug 29, 2024
@lllllllillllllillll
Copy link
Owner

For the latest version (v0.60) you basically end up persisting the entire app in a docker volume. This should work:

version: "3.9"
services:
  dweebui:
    container_name: dweebui
    image: lllllllillllllillll/dweebui
    environment:
      PORT: 8000
      SECRET: MrWiskers
    restart: unless-stopped
    ports:
      - 8093:8000
    volumes:
      - dweebui:/app
      - /var/run/docker.sock:/var/run/docker.sock

volumes:
  dweebui:

I've resolved this in v0.7X-dev, where you only need to persist the database and the registration secret is configured in the webui under settings:

docker run -d --name=DweebUI -p 8093:8000 -v dweebui:/app/database -v /var/run/docker.sock:/var/run/docker.sock lllllllillllllillll/dweebui:v0.7X-dev

v0.7X-dev is broken rolling release.

@samcro1967
Copy link
Author

latest with /app mounted does not work with the following error:

node:internal/modules/cjs/loader:1215
  throw err;
  ^

Error: Cannot find module '/app/server.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15)
    at Module._load (node:internal/modules/cjs/loader:1038:27)
    at wrapModuleLoad (node:internal/modules/cjs/loader:212:19)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:5)
    at node:internal/main/run_main_module:30:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.3.0

v0.7X-dev with /app/database mounted does not work with the following error:.

2024-08-29T12:34:29: PM2 log: Launching in no daemon mode
2024-08-29T12:34:29: PM2 log: App [server:0] starting in -fork mode-
2024-08-29T12:34:29: PM2 log: App [server:0] online
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/database/config.js' imported from /app/server.js
    at finalizeResolution (node:internal/modules/esm/resolve:257:11)
    at moduleResolve (node:internal/modules/esm/resolve:914:10)
    at defaultResolve (node:internal/modules/esm/resolve:1038:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:554:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:523:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
    at ModuleJob._link (node:internal/modules/esm/module_job:126:49) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///app/database/config.js'
}

@lllllllillllllillll
Copy link
Owner

Did you copy and paste what I sent?
If you're trying to use bind mounts you're overwriting the files in the container.

@samcro1967
Copy link
Author

I did work switching to a non bind mount and running the container as root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants