Errors in .env? #11

Closed
opened 2025-12-29 19:52:22 +00:00 by jeppebundsgaard · 3 comments

I tried to install forgejo. I think some things are wrong in the .env.sample-file.
In the first line the TYPE is gitea - shouldn't it be forgejo?

# Enable to use forgejo instead of gitea
# COMPOSE_FILE="$COMPOSE_FILE:compose.forgejo.yml"
# SECRET_LFS_JWT_SECRET_VERSION=v1 # length=43

Why isn't forgejo enabled by default - I chose the forgejo-recipe...
There is no file called compose.forgejo.yml, but there is a compose.yml - should it be renamed or the file-name corrected?

Other recipes set the correct URL - could that be done here as well?

DOMAIN=git.example.com

And later, maybe this can be reused?

GITEA_DOMAIN=$DOMAIN

There is a section with mail-settings.

# SMTP Mailer
# COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml"
# GITEA_SMTP_MAILER_ENABLED=1
# GITEA_MAILER_ADDR=mail.gandi.net
# GITEA_MAILER_PORT=465
# SECRET_SMTP_PASSWORD_VERSION=v1
# GITEA_MAILER_PROTOCOL=smtps

Does this create a mail-server?

Can I use my ordinary smtp-server to send mail? It it is not possible to set the password.

I tried to follow these suggestions, but the app does not finish deployment.

I tried to install forgejo. I think some things are wrong in the `.env.sample`-file. In the first line the `TYPE` is `gitea` - shouldn't it be `forgejo`? ``` # Enable to use forgejo instead of gitea # COMPOSE_FILE="$COMPOSE_FILE:compose.forgejo.yml" # SECRET_LFS_JWT_SECRET_VERSION=v1 # length=43 ``` Why isn't forgejo enabled by default - I chose the forgejo-recipe... There is no file called `compose.forgejo.yml`, but there is a `compose.yml` - should it be renamed or the file-name corrected? Other recipes set the correct URL - could that be done here as well? ``` DOMAIN=git.example.com ``` And later, maybe this can be reused? ``` GITEA_DOMAIN=$DOMAIN ``` There is a section with mail-settings. ``` # SMTP Mailer # COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml" # GITEA_SMTP_MAILER_ENABLED=1 # GITEA_MAILER_ADDR=mail.gandi.net # GITEA_MAILER_PORT=465 # SECRET_SMTP_PASSWORD_VERSION=v1 # GITEA_MAILER_PROTOCOL=smtps ``` Does this create a mail-server? Can I use my ordinary smtp-server to send mail? It it is not possible to set the password. I tried to follow these suggestions, but the app does not finish deployment.
Owner

Hey, sorry you ran into these problems. I forked this recipe from the gitea one and forgot to update the .env.sample file. I just pushed an update to main which could could try (I have not tested it though).

Does this create a mail-server?

No this should connect to your existing smtp server. Can you give an error message, when you try to set the password

Hey, sorry you ran into these problems. I forked this recipe from the gitea one and forgot to update the .env.sample file. I just pushed an update to main which could could try (I have not tested it though). > Does this create a mail-server? No this should connect to your existing smtp server. Can you give an error message, when you try to set the password

Thank you for helping me :-). I managed to succeed. A few things to notice:

When creating (abra app new forgejo) I got this message:

FATA missing version for secret? (lfs_jwt_secret)

But it worked, anyways.

The command to create an admin-user failed:

Error: unknown shorthand flag: 'c' in -c

I managed to create a user by going into bash:

abra app run git.xn--folkefderation-vqb.dk app bash

and then run this command. After some trial and error, I added --config /etc/gitea/app.ini.

gitea --config /etc/gitea/app.ini admin user create --username USERNAME --admin --random-password --email EMAIL

Maybe the shorthand that failed before should have been --config?

Thank you for helping me :-). I managed to succeed. A few things to notice: When creating (`abra app new forgejo`) I got this message: > FATA missing version for secret? (lfs_jwt_secret) But it worked, anyways. The command to create an admin-user failed: > Error: unknown shorthand flag: 'c' in -c I managed to create a user by going into bash: `abra app run git.xn--folkefderation-vqb.dk app bash` and then run this command. After some trial and error, I added `--config /etc/gitea/app.ini`. `gitea --config /etc/gitea/app.ini admin user create --username USERNAME --admin --random-password --email EMAIL` Maybe the shorthand that failed before should have been --config?
Owner

i just released 13.0.4 (noticed late the renovate bot pr) including @p4u1 changes to .env.sample

i just released 13.0.4 (noticed late the renovate bot pr) including @p4u1 changes to .env.sample
Sign in to join this conversation.
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/forgejo#11
No description provided.