Skip to content

The instructions for running with Docker compose result in a broken installation #3063

Open

Description

@pmbrandvold

I was able to get the script/setup and script/server files to run after changing every reference to "docker-compose" to "docker compose" to reflect how the docker engine calls compose now. However, this resulted in an instance that runs but doesn't have a users table, apparently. After hitting localhost:3000 I can launch a login page that says "We're sorry, but something went wrong.
If you are the application owner check the logs for more information."

The container logs show:

WARN[0000] The "RAILS_ENV" variable is not set. Defaulting to a blank string.
WARN[0000] The "DATABASE_NAME" variable is not set. Defaulting to a blank string.
WARN[0000] /mnt/c/Git/tracks/tracks-2.7.1/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Creating 1/0
 ✔ Container tracks-271-db-1  Running                                                        0.0s
=> Booting Puma
=> Rails 6.1.7.8 application starting in production
=> Run `bin/rails server --help` for more startup options
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Puma starting in single mode...
* Puma version: 6.4.2 (ruby 3.3.5-p100) ("The Eagle of Durango")
*  Min threads: 5
*  Max threads: 5
*  Environment: production
*          PID: 12
* Listening on http://0.0.0.0:3000
Use Ctrl-C to stop
I, [2024-09-11T20:52:29.826583 #12]  INFO -- : [dc906ed2-7054-4701-a358-c6b0d595660c] Started GET "/" for 172.18.0.1 at 2024-09-11 20:52:29 +0000
I, [2024-09-11T20:52:29.840984 #12]  INFO -- : [dc906ed2-7054-4701-a358-c6b0d595660c] Processing by TodosController#index as HTML
I, [2024-09-11T20:52:29.851685 #12]  INFO -- : [dc906ed2-7054-4701-a358-c6b0d595660c] Redirected to http://localhost:3000/login
I, [2024-09-11T20:52:29.851842 #12]  INFO -- : [dc906ed2-7054-4701-a358-c6b0d595660c] Filter chain halted as :login_or_feed_token_required rendered or redirected
I, [2024-09-11T20:52:29.852104 #12]  INFO -- : [dc906ed2-7054-4701-a358-c6b0d595660c] Completed 302 Found in 11ms (Allocations: 1042)
I, [2024-09-11T20:52:29.886677 #12]  INFO -- : [f952f51c-8282-4379-ae4c-e8a375b7d4e6] Started GET "/login" for 172.18.0.1 at 2024-09-11 20:52:29 +0000
I, [2024-09-11T20:52:29.887615 #12]  INFO -- : [f952f51c-8282-4379-ae4c-e8a375b7d4e6] Processing by LoginController#login as HTML
I, [2024-09-11T20:52:29.909408 #12]  INFO -- : [f952f51c-8282-4379-ae4c-e8a375b7d4e6] Completed 500 Internal Server Error in 22ms (ActiveRecord: 2.0ms | Allocations: 2732)
F, [2024-09-11T20:52:29.910507 #12] FATAL -- : [f952f51c-8282-4379-ae4c-e8a375b7d4e6]
[f952f51c-8282-4379-ae4c-e8a375b7d4e6] ActiveRecord::StatementInvalid (Mysql2::Error: Table 'tracks.users' doesn't exist):
[f952f51c-8282-4379-ae4c-e8a375b7d4e6]
[f952f51c-8282-4379-ae4c-e8a375b7d4e6] app/models/user.rb:146:in `no_users_yet?'
[f952f51c-8282-4379-ae4c-e8a375b7d4e6] app/controllers/login_controller.rb:25:in `login'

It's clear there is' a missing table (tracks.users) but as far as the instructions say, things should be working after running the scripts.

Beyond this issue, there's no really effective way for me to run this in something like portainer, because it requires me to run a bunch of separate scripts to manipulate the docker file and container instances. Is there an easier way to do this? I have an old version of tracks working but it's using Stannoe's docker image which is outdated. Ultimately I just want to update my current instance but I'm stuck until I have a way to set things up with the latest code...

Activity

  1. topcu-muhammet commented on Oct 7, 2024

    @topcu-muhammet

    Same here. Is there any solution?

  2. pmbrandvold commented on Oct 9, 2024

    @pmbrandvold
    Author

    What would be easier is if I could just use the tracksapp/tracks image, but there's no documentation on how to set that up in a compose stack. It seems as though it requires a database, which makes sense. But there's no documentation on how to set a database up to be used with the tracksapp/tracks image (which is presumably just a frontend? I'm not sure). When I just pull "tracksapp/tracks" and run it, I get an error that seems to be from no user existing yet, but there's no instructions on how to set up a user.

  3. gauravagnihotristla commented on Apr 29, 2025

    @gauravagnihotristla

    what worked for me -
    try version 2.7.0.tar.gz
    I use this on my personal server proxmox - container ubuntu24.04
    edit Dockerfile and make this small change

    after that it was as easy as

    ./script/setup 
    ./script/server
    
  4. mbedded commented on Jun 18, 2025

    @mbedded

    The "issue" is the missing migration. Somwhere in the docs it says, you have to run rake db:migrate.
    So I attached a terminal to my docker container, ran the command and the database was populated.

    After that I was able to create a new user in the Web UI (please note that you have to use upper/lower characters, numbers and special characters, otherwise it will show you an error message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions