[GH-ISSUE #1448] Documentation is lacking and no database in docker? #406

Open
opened 2026-02-26 18:46:55 +03:00 by kerem · 11 comments
Owner

Originally created by @deanfourie1 on GitHub (Nov 6, 2024).
Original GitHub issue: https://github.com/documenso/documenso/issues/1448

Describe the improvement you are suggesting in detail

Im not sure if I am missing something, but why is the database not included in the docker build? Do we need a separate database to use documenso?

Additional Information & Alternatives (optional)

Simply running the docker container does not work? I would help but I dont know how

Do you want to work on this improvement?

No

Please check the boxes that apply to this improvement suggestion.

  • I have searched the existing issues and improvement suggestions to avoid duplication.
  • I have provided a clear description of the improvement being suggested.
  • I have explained the rationale behind this improvement.
  • I have included any relevant technical details or design suggestions.
  • I understand that this is a suggestion and that there is no guarantee of implementation.
Originally created by @deanfourie1 on GitHub (Nov 6, 2024). Original GitHub issue: https://github.com/documenso/documenso/issues/1448 ### Describe the improvement you are suggesting in detail Im not sure if I am missing something, but why is the database not included in the docker build? Do we need a separate database to use documenso? ### Additional Information & Alternatives (optional) Simply running the docker container does not work? I would help but I dont know how ### Do you want to work on this improvement? No ### Please check the boxes that apply to this improvement suggestion. - [X] I have searched the existing issues and improvement suggestions to avoid duplication. - [X] I have provided a clear description of the improvement being suggested. - [X] I have explained the rationale behind this improvement. - [X] I have included any relevant technical details or design suggestions. - [X] I understand that this is a suggestion and that there is no guarantee of implementation.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2024):

Thank you for opening your first issue and for being a part of the open signing revolution!

One of our team members will review it and get back to you as soon as it possible 💚

Meanwhile, please feel free to hop into our community in Discord

<!-- gh-comment-id:2459200310 --> @github-actions[bot] commented on GitHub (Nov 6, 2024): Thank you for opening your first issue and for being a part of the open signing revolution! <br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
Author
Owner

@dguyen commented on GitHub (Nov 6, 2024):

Hi!

The Docker Compose setup has a database setup with it, whereas the standalone Docker does not.

https://docs.documenso.com/developers/self-hosting/how-to#docker

If you decide to use the standalone Docker setup you will need to provide your own database and email service.

<!-- gh-comment-id:2459224703 --> @dguyen commented on GitHub (Nov 6, 2024): Hi! The Docker Compose setup has a database setup with it, whereas the standalone Docker does not. https://docs.documenso.com/developers/self-hosting/how-to#docker If you decide to use the standalone Docker setup you will need to provide your own database and email service.
Author
Owner

@deanfourie1 commented on GitHub (Nov 6, 2024):

Thanks, I tried this but I am getting errors. It seems that the provided .env example entries does not contain all the variables.

Following these instructions

Set Up Environment Variables
Create a .env file in the same directory as the compose.yml file.

Then add your SMTP details as well as the following environment variables:

NEXTAUTH_SECRET="<your-secret>"
NEXT_PRIVATE_ENCRYPTION_KEY="<your-key>"
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="<your-secondary-key>"
NEXT_PUBLIC_WEBAPP_URL="<your-url>"
NEXT_PRIVATE_SMTP_TRANSPORT="smtp-auth"
NEXT_PRIVATE_SMTP_HOST="<your-host>"
NEXT_PRIVATE_SMTP_PORT=<your-port>
NEXT_PRIVATE_SMTP_USERNAME="<your-username>"
NEXT_PRIVATE_SMTP_PASSWORD="<your-password>"

I receive the following errors.

WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_ID" variable is not set. Defaulting to a blank string. 
WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_SECRET" variable is not set. Defaulting to a blank string. 
WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. 
parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_DATABASE_URL is missing a value: error

Using the .env.example in the repo, then I get this error.

WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_ID" variable is not set. Defaulting to a blank string. 
WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_SECRET" variable is not set. Defaulting to a blank string. 
WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. 
parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_DATABASE_URL is missing a value: err
parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.database.environment.[]: required variable POSTGRES_USER is missing a value: error

There is no POSTGRES_USER variable in ANY of the .env examples provided.

<!-- gh-comment-id:2459415802 --> @deanfourie1 commented on GitHub (Nov 6, 2024): Thanks, I tried this but I am getting errors. It seems that the provided .env example entries does not contain all the variables. Following these instructions ``` Set Up Environment Variables Create a .env file in the same directory as the compose.yml file. Then add your SMTP details as well as the following environment variables: NEXTAUTH_SECRET="<your-secret>" NEXT_PRIVATE_ENCRYPTION_KEY="<your-key>" NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="<your-secondary-key>" NEXT_PUBLIC_WEBAPP_URL="<your-url>" NEXT_PRIVATE_SMTP_TRANSPORT="smtp-auth" NEXT_PRIVATE_SMTP_HOST="<your-host>" NEXT_PRIVATE_SMTP_PORT=<your-port> NEXT_PRIVATE_SMTP_USERNAME="<your-username>" NEXT_PRIVATE_SMTP_PASSWORD="<your-password>" ``` I receive the following errors. ``` WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_SECRET" variable is not set. Defaulting to a blank string. WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_DATABASE_URL is missing a value: error ``` Using the .env.example in the repo, then I get this error. ``` WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "NEXT_PRIVATE_GOOGLE_CLIENT_SECRET" variable is not set. Defaulting to a blank string. WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_DATABASE_URL is missing a value: err parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.database.environment.[]: required variable POSTGRES_USER is missing a value: error ``` There is no POSTGRES_USER variable in ANY of the .env examples provided.
Author
Owner

@dguyen commented on GitHub (Nov 6, 2024):

Thanks for providing that information

Could you please update your .env file to include these

POSTGRES_USER="documenso"
POSTGRES_PASSWORD="password"
POSTGRES_DB="documenso"

NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@database:5432/documenso"

Update the to what you would like NEXT_PRIVATE_DATABASE_URL should be updated if you change the POSTGRES_* envs

Let me know how that goes

<!-- gh-comment-id:2459450580 --> @dguyen commented on GitHub (Nov 6, 2024): Thanks for providing that information Could you please update your .env file to include these ``` POSTGRES_USER="documenso" POSTGRES_PASSWORD="password" POSTGRES_DB="documenso" NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@database:5432/documenso" ``` Update the to what you would like `NEXT_PRIVATE_DATABASE_URL` should be updated if you change the POSTGRES_* envs Let me know how that goes
Author
Owner

@deanfourie1 commented on GitHub (Nov 6, 2024):

Thanks for providing that information

Could you please update your .env file to include these

POSTGRES_USER="documenso"
POSTGRES_PASSWORD="password"
POSTGRES_DB="documenso"

NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@database:5432/documenso"

Update the to what you would like NEXT_PRIVATE_DATABASE_URL should be updated if you change the POSTGRES_* envs

Let me know how that goes

Thanks,

I added it but then I get this,

parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_SMTP_FROM_NAME is missing a value: err

I will go ahead and add it and see how I go but could be worth looking into :)

<!-- gh-comment-id:2459458228 --> @deanfourie1 commented on GitHub (Nov 6, 2024): > Thanks for providing that information > > Could you please update your .env file to include these > > ``` > POSTGRES_USER="documenso" > POSTGRES_PASSWORD="password" > POSTGRES_DB="documenso" > > NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@database:5432/documenso" > ``` > > Update the to what you would like `NEXT_PRIVATE_DATABASE_URL` should be updated if you change the POSTGRES_* envs > > Let me know how that goes Thanks, I added it but then I get this, `parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_SMTP_FROM_NAME is missing a value: err` I will go ahead and add it and see how I go but could be worth looking into :)
Author
Owner

@deanfourie1 commented on GitHub (Nov 6, 2024):

Just looking at this compose file, it appears there are a lot of variable to be defined in the .env, but the env example provided only has the value pasted above.

Wouldnt all these variables need to be defined in the .env?

image
<!-- gh-comment-id:2459462197 --> @deanfourie1 commented on GitHub (Nov 6, 2024): Just looking at this compose file, it appears there are a lot of variable to be defined in the .env, but the env example provided only has the value pasted above. Wouldnt all these variables need to be defined in the .env? <img width="463" alt="image" src="https://github.com/user-attachments/assets/c00c4eb5-07e2-44de-87f2-e3dc53eb7205">
Author
Owner

@dguyen commented on GitHub (Nov 6, 2024):

Yeah we list them in the docs, or at least most of them

https://docs.documenso.com/developers/self-hosting/how-to#advanced-configuration

I think the original intention for the env example in the docs is to provide a subset of the minimum required environment variables to get started (obviously missing a few outlined above). Since the real env example for the app contains unrelated environment variables that we use internally.

parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_SMTP_FROM_NAME is missing a value: err

Yeah that one is part of the original requirements. Edit -> One of the original requirements that should be in the example

<!-- gh-comment-id:2459477887 --> @dguyen commented on GitHub (Nov 6, 2024): Yeah we list them in the docs, or at least most of them https://docs.documenso.com/developers/self-hosting/how-to#advanced-configuration I think the original intention for the env example in the docs is to provide a subset of the minimum required environment variables to get started (obviously missing a few outlined above). Since the real env example for the app contains unrelated environment variables that we use internally. > parsing /opt/stacks/documenso/compose.yaml: error while interpolating services.documenso.environment.[]: required variable NEXT_PRIVATE_SMTP_FROM_NAME is missing a value: err Yeah that one is part of the original requirements. Edit -> One of the original requirements that should be in the example
Author
Owner

@deanfourie1 commented on GitHub (Nov 6, 2024):

Also I can confirm that email is not working. I have tried every combination to send an email, all different ports for SMTP and the email does not send.

Is there a way I can activate my account without email? I noticed it generates a code in cli like cm35ud9wo0000o228ci31p0ce,

Can I just use http://domain.com:3000/cm35ud9wo0000o228ci31p0ce or something to activate the account?

<!-- gh-comment-id:2459604778 --> @deanfourie1 commented on GitHub (Nov 6, 2024): Also I can confirm that email is not working. I have tried every combination to send an email, all different ports for SMTP and the email does not send. Is there a way I can activate my account without email? I noticed it generates a code in cli like cm35ud9wo0000o228ci31p0ce, Can I just use http://domain.com:3000/cm35ud9wo0000o228ci31p0ce or something to activate the account?
Author
Owner

@dguyen commented on GitHub (Nov 6, 2024):

Yeah you should be able to directly use /verify-email/{token} to verify the email

Alternatively you can just set it to verified in the database by setting emailVerified to a date

Also I can confirm that email is not working

You may need to set NEXT_PRIVATE_INTERNAL_WEBAPP_URL

<!-- gh-comment-id:2459621605 --> @dguyen commented on GitHub (Nov 6, 2024): Yeah you should be able to directly use `/verify-email/{token}` to verify the email Alternatively you can just set it to verified in the database by setting `emailVerified` to a date > Also I can confirm that email is not working You may need to set `NEXT_PRIVATE_INTERNAL_WEBAPP_URL`
Author
Owner

@deanfourie1 commented on GitHub (Nov 7, 2024):

I am still unable to activate my account,

When pasting the activation link, I get a message that the account is already activated. However when attempting to login it takes me to the email activation screen.

image
<!-- gh-comment-id:2461912784 --> @deanfourie1 commented on GitHub (Nov 7, 2024): I am still unable to activate my account, When pasting the activation link, I get a message that the account is already activated. However when attempting to login it takes me to the email activation screen. <img width="385" alt="image" src="https://github.com/user-attachments/assets/ad750f32-0ea5-4f78-92ee-5cad4ac55bc3">
Author
Owner

@doronkatz commented on GitHub (Jan 21, 2025):

When I add the settings above I get when creating a new user:

Can't reach database server at `database`:`54320`

Please make sure your database server is running at `database`:`54320`.
    at Cn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:7090)
    at Cn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:6206)
    at Cn.request (/app/node_modules/@prisma/client/runtime/library.js:123:5926)
    at async l (/app/node_modules/@prisma/client/runtime/library.js:128:9968)
    at async h (/app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:114039)
    at async /app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:129336
    at async resolveMiddleware (file:///app/node_modules/@trpc/server/dist/index.mjs:420:30)
    at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32)
    at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32)
    at async resolve (file:///app/node_modules/@trpc/server/dist/index.mjs:486:24) {
  clientVersion: '5.4.2',
  errorCode: undefined
<!-- gh-comment-id:2603413182 --> @doronkatz commented on GitHub (Jan 21, 2025): When I add the settings above I get when creating a new user: ``` Can't reach database server at `database`:`54320` Please make sure your database server is running at `database`:`54320`. at Cn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:7090) at Cn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:6206) at Cn.request (/app/node_modules/@prisma/client/runtime/library.js:123:5926) at async l (/app/node_modules/@prisma/client/runtime/library.js:128:9968) at async h (/app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:114039) at async /app/apps/web/.next/server/pages/api/trpc/[trpc].js:1:129336 at async resolveMiddleware (file:///app/node_modules/@trpc/server/dist/index.mjs:420:30) at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32) at async callRecursive (file:///app/node_modules/@trpc/server/dist/index.mjs:456:32) at async resolve (file:///app/node_modules/@trpc/server/dist/index.mjs:486:24) { clientVersion: '5.4.2', errorCode: undefined ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#406
No description provided.