-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Updating docker compose documentation #580
Comments
From
serverConfig.dataDir comes from ..\shared\config.ts. dataDir is defined at line 106 what the heck is "zod". I have Like Mohammad said, I will have to make sure that .env gets symlink'd in each app directory (e.g. /apps/web, /apps/workers) and also /packages/db. |
did you symlink the '.env' file to the apps/web directory? You need to do that and then run the db migrations. |
oh, you're using the dev docker compose. Those instructions are for non-docker dev. In the docker dev setup. The data dir should point to the dir inside the container. You can mount a volume at the same place if you want persistence. |
👀 First off, thank you for peeking in! I'm looking to update the instructions for the docker dev environment, because I was looking to contribute to issue 556, and thought I might as well document this set up while we are at it.
Is this what you mean when you say "The data dir should point to the dir inside the container. You can mount a volume at the same place if you want persistence."? @MohamedBassem UPDATE: For context, I am not immediately familiar with using volumes as a separate thing. I am looking up the documentation right now, however. UDPATE 2: Ah I see. Per the docker compose documentation, "The db-data volume is mounted at the /var/lib/backup/data and /etc/data container paths for backup and backend respectively.". Which means that it will be mounted at UPDATE 3: I've created UPDATE 4: I haven't seen if the above changes will work, but if it doesn't, I may forego that and instead make changes to something that works (of which I will be documenting) UPDATE 5: I am tackling both point 1 and point 4 by moving the .env into |
Note for Disabling Sign In's as per Issue 556
which could be repurposed to solve #556 ? I haven't looked into it though |
Okay, I am at a complete loss. I am getting a Copy pasting my message in the discord
Hey gang, this is following up from #580. I have no idea how to begin debugging this error. I have an .env file in /packages/db, /app/workers, and /app/web. I keep on getting the "Cannot open database because the directory does not exist" error. I've tried what feels like everything. I've also tried changing the default value in /packages/shared/config.ts but also no dice 😭 I would like to know what data the program is getting from process.env in line 113 in /packages/shared/config.ts so that maybe I can also get an idea of what it is or isn't seeing. If not that, then perhaps some way to check what the database url is looking like in line 10 of /packages/db/drizzle.ts? Help would be greatly appriciated!! I can confirm that docker is not the issue as there exists a db.db in the persisted /data directory. (also when I execute some commands in the meilisearch container, i can see the persistant directory as well) |
Trying THAT WORKED. OKAY THEN!! Massive shoutout to for coming in clutch there! |
fresh install (this is my first try at hoarder) added to my docker-compose.yml and the web service won't start with a similar error, I'm not using the docker-compose.dev.yml file (I'm following the instructions here: https://docs.hoarder.app/Installation/docker/) "Running db migration script TypeError: Cannot open database because the directory does not exist Node.js v22.11.0 |
I can second this. I tried to deploy a new instance to coolify via the services tab. Create the service, change .env variable and am getting the same error. |
I'm leaving this here for anyone reaching this issue via google: The "cannot open database because the directory does not exist" issue derives from editing the "DATA_DIR" env. The default docker-compose.yml example could benefit from a comment (something like #DO NOT EDIT near the line) or maybe it's just me assuming that an ENV could be edited. Anyway, do not edit the EDIT: There is actually a discussion (#917) where the issue is acknowledged, never mind my suggestion about editing documentation above. |
This is me documenting my steps as I setup a dev environment for a Windows Machine.
time="2024-10-22T16:20:51-04:00" level=warning msg="\\hoarder-dev\\hoarder\\docker\\docker-compose.dev.yml:
versionis obsolete" env file \hoarder-dev\hoarder\docker\.env not found: CreateFile \hoarder-dev\hoarder\docker\.env: The system cannot find the file specified.
The instructions on the website says to
Start by copying the template by cp .env.sample .env.
If we want this to be true, then we should change the docker-compose.dev.yaml to look one directory above.Alternatively, we can add a specific instruction for docker set ups to copy the .env file into the docker directory.
Progress: resolved 0, reused 0, downloaded 442, added 456
. Will keep updated on if this is expected.If I have understood this correctly, apparently this step is
Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.0.0-alpha.8.tgz
. It looks like it is installing 3121 packages. Just noting here that this is giving my laptop a RUN for it's money, fans are spinning lol.i was right 😄
This came in the form of
Continued below
Device Details
Windows 11
Exact Hoarder Version
v0.18.0
The text was updated successfully, but these errors were encountered: