[GH-ISSUE #75] Bug: Docker instance using default compose template - Error message on web page on first login #5937

Closed
opened 2026-04-20 16:23:51 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @jamess60 on GitHub (Jul 6, 2023).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/75

Description

Hi

I have just spun up a docker instance of Vikunja using the compose example (without any reverse proxy) - see here

When logging in for the first time, I get the following error:
An error occurred: AxiosError: Network Error Please check if the api url is correct.

The logs for the DB and FE containers look fine, but this is the output of the API container:

info: creating the new user vikunja with 1000:1000
usermod: no changes
2023/07/06 19:49:07 No config file found, using default or config from environment variables.
2023-07-06T19:49:07.351882121Z: CRITICAL ▶ migration/Migrate 002 Migration failed: dial tcp: lookup db on 127.0.0.11:53: no such host
^ Infinite loop of these lines

Vikunja Frontend Version

docker:latest

Vikunja API Version

docker:latest

Browser and version

Firefox Developer Edition 116.0b1 macOS

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

Screenshot 2023-07-06 at 21 55 11

Originally created by @jamess60 on GitHub (Jul 6, 2023). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/75 ### Description Hi I have just spun up a docker instance of Vikunja using the compose example (without any reverse proxy) - see [here](https://vikunja.io/docs/full-docker-example/) When logging in for the first time, I get the following error: An error occurred: AxiosError: Network Error Please check if the api url is correct. The logs for the DB and FE containers look fine, but this is the output of the API container: info: creating the new user vikunja with 1000:1000 usermod: no changes 2023/07/06 19:49:07 No config file found, using default or config from environment variables. 2023-07-06T19:49:07.351882121Z: CRITICAL ▶ migration/Migrate 002 Migration failed: dial tcp: lookup db on 127.0.0.11:53: no such host ^ Infinite loop of these lines ### Vikunja Frontend Version docker:latest ### Vikunja API Version docker:latest ### Browser and version Firefox Developer Edition 116.0b1 macOS ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots ![Screenshot 2023-07-06 at 21 55 11](https://github.com/go-vikunja/api/assets/126415249/141afded-75da-47eb-8481-bb246b0c60c4)
Author
Owner

@kolaente commented on GitHub (Jul 6, 2023):

2023-07-06T19:49:07.351882121Z: CRITICAL arrow_forward migration/Migrate 002 Migration failed: dial tcp: lookup db on 127.0.0.11:53: no such host

That means in your config the api can't reach the database? Did you use the compose file verbantim?

When the api can't reach the DB it won't start up, hence the error message in the frontend.

<!-- gh-comment-id:1624252848 --> @kolaente commented on GitHub (Jul 6, 2023): > 2023-07-06T19:49:07.351882121Z: CRITICAL arrow_forward migration/Migrate 002 Migration failed: dial tcp: lookup db on 127.0.0.11:53: no such host That means in your config the api can't reach the database? Did you use the compose file verbantim? When the api can't reach the DB it won't start up, hence the error message in the frontend.
Author
Owner

@jamess60 commented on GitHub (Jul 6, 2023):

Hi

Changes made to the default:

  • Added "vikunja-" to each service name (and updated the api depends on to reflect the new name)
  • Updated VIKUNJA_API_URL to the IP of the host (as the instructions state)
  • DB password (its the same in API and DB so should be ok)
  • Host side of the volume path

I didnt make any changes that would cause issues as far as I can tell

My compose exert can be found in this pastebin, the password is github123, there is no expiration date
https://pastebin.com/d30P37NZ

<!-- gh-comment-id:1624257058 --> @jamess60 commented on GitHub (Jul 6, 2023): Hi Changes made to the default: - Added "vikunja-" to each service name (and updated the api depends on to reflect the new name) - Updated VIKUNJA_API_URL to the IP of the host (as the instructions state) - DB password (its the same in API and DB so should be ok) - Host side of the volume path I didnt make any changes that would cause issues as far as I can tell My compose exert can be found in this pastebin, the password is github123, there is no expiration date https://pastebin.com/d30P37NZ
Author
Owner

@kolaente commented on GitHub (Jul 6, 2023):

Added "vikunja-" to each service name (and updated the api depends on to reflect the new name)

That changes the name of the database service. You need to adjust the value of VIKUNJA_DATABASE_HOST in the api config.

<!-- gh-comment-id:1624258733 --> @kolaente commented on GitHub (Jul 6, 2023): > Added "vikunja-" to each service name (and updated the api depends on to reflect the new name) That changes the name of the database service. You need to adjust the value of `VIKUNJA_DATABASE_HOST` in the api config.
Author
Owner

@kolaente commented on GitHub (Jul 6, 2023):

Why did you prefix the name? Compose does that automatically?

<!-- gh-comment-id:1624258977 --> @kolaente commented on GitHub (Jul 6, 2023): Why did you prefix the name? Compose does that automatically?
Author
Owner

@jamess60 commented on GitHub (Jul 6, 2023):

Good spot - layer 8 issue afterall! Thank you so much - I do apologise!

I changed it because docker changed the prefix to the directory name the compose file was in which wasnt ideal for me.

<!-- gh-comment-id:1624263236 --> @jamess60 commented on GitHub (Jul 6, 2023): Good spot - layer 8 issue afterall! Thank you so much - I do apologise! I changed it because docker changed the prefix to the directory name the compose file was in which wasnt ideal for me.
Author
Owner

@kolaente commented on GitHub (Jul 6, 2023):

Glad to hear it's solved now!

I changed it because docker changed the prefix to the directory name the compose file was in which wasnt ideal for me.

You can change that with the COMPOSE_PROJECT_NAME environment variable. It only has to be set in your shell, but you can also put it in a .env file and docker compose will read and pick that up.

<!-- gh-comment-id:1624267101 --> @kolaente commented on GitHub (Jul 6, 2023): Glad to hear it's solved now! > I changed it because docker changed the prefix to the directory name the compose file was in which wasnt ideal for me. You can change that with the `COMPOSE_PROJECT_NAME` environment variable. It only has to be set in your shell, but you can also put it in a `.env` file and docker compose will read and pick that up.
Author
Owner

@jamess60 commented on GitHub (Jul 6, 2023):

Sweet - thanks for the tip!

Noticed it even supports 2FA, must say this is a really polished and well thought out tool, thanks guys! Good effort

<!-- gh-comment-id:1624272701 --> @jamess60 commented on GitHub (Jul 6, 2023): Sweet - thanks for the tip! Noticed it even supports 2FA, must say this is a really polished and well thought out tool, thanks guys! Good effort
Author
Owner

@Neurology0443 commented on GitHub (Jul 23, 2023):

Solved also my issue ! Thanks for your beautiful piece of software !

<!-- gh-comment-id:1646985598 --> @Neurology0443 commented on GitHub (Jul 23, 2023): Solved also my issue ! Thanks for your beautiful piece of software !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#5937