bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.31k stars 4.79k forks source link

[bitnami/redmine] docker-compose start redmine5 How to solve the error #63434

Closed ffb04 closed 6 months ago

ffb04 commented 7 months ago

Name and Version

bitnami/redmine5.1.1.

What architecture are you using?

None

What steps will reproduce the bug?

If this is a development machine, remove the Gemfile.lock freeze by running bundle config set frozen false.

What is the expected behavior?

No response

What do you see instead?

redmine-1   | redmine 06:37:02.37 INFO  ==> Configuring Redmine database connections
redmine-1   | redmine 06:37:02.42 INFO  ==> Configuring Redmine application with settings provided via environment variables
redmine-1   | redmine 06:37:02.43 INFO  ==> Executing database migrations
redmine-1   | redmine 06:37:02.43 DEBUG ==> Generating secret tokens
redmine-1   | bundler: failed to load command: rake (/opt/bitnami/redmine/vendor/bundle/ruby/3.1.0/bin/rake)
redmine-1   | /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/definition.rb:420:in `ensure_equivalent_gemfile_and_lockfile': , but the lockfile can't be updated because frozen mode is set (Bundler::ProductionError)
redmine-1   | 
redmine-1   | You have deleted from the Gemfile:
redmine-1   | * mysql2 (~> 0.5.0)
redmine-1   | * with_advisory_lock
redmine-1   | 
redmine-1   | Run `bundle install` elsewhere and add the updated Gemfile to version control.
redmine-1   | If this is a development machine, remove the Gemfile.lock freeze by running `bundle config set frozen false`.
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/runtime.rb:13:in `setup'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler.rb:162:in `setup'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/setup.rb:26:in `block in <top (required)>'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/ui/shell.rb:159:in `with_level'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/ui/shell.rb:111:in `silence'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/setup.rb:26:in `<top (required)>'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:56:in `require_relative'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:56:in `kernel_load'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
redmine-1   |   from /opt/bitnami/ruby/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>'
redmine-1   |   from /opt/bitnami/ruby/bin/bundle:25:in `load'
redmine-1   |   from /opt/bitnami/ruby/bin/bundle:25:in `<main>'
redmine-1 exited with code 1
postgresql  | 2024-02-28 06:42:02.366 GMT [83] LOG:  checkpoint starting: time
postgresql  | 2024-02-28 06:42:02.373 GMT [83] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.002 s, total=0.007 s; sync files=2, longest=0.002 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/1955150, redo lsn=0/1955118

Additional information

# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0

version: '2'
services:
  postgresql:
    image: docker.io/bitnami/postgresql:16
    #command:
    #  [
    #    "sh",
    #    "-c",
    #    "/bin/chmod -R 777 /bitnami/postgresql",
    #  ]
    volumes:
      - ./redmine_pgdata:/bitnami/postgresql:rw
    privileged: true
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
      - POSTGRESQL_USERNAME=bn_redmine
      - POSTGRESQL_DATABASE=bitnami_redmine
    container_name: postgresql
  redmine:
    image: docker.io/bitnami/redmine
    ports:
      - '80:3000'
    volumes:
      - /web/redmine/data:/bitnami
      - /web/redmine/redmine_config:/opt/bitnami/redmine/config:rw
        #- /web/redmine/redmine_persistence:/bitnami/redmine:rw
    depends_on:
      - postgresql
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
      - REDMINE_DATABASE_TYPE=postgresql
      - REDMINE_DATABASE_HOST=postgresql
      - REDMINE_DATABASE_PORT_NUMBER=5432
      - REDMINE_DATABASE_USER=bn_redmine
      - REDMINE_DATABASE_NAME=bitnami_redmine
      - BITNAMI_DEBUG=true 
javsalgar commented 7 months ago

Hi,

Could you explain your use case in more detail? I see that you are mounting several folders

ffb04 commented 7 months ago

reference:https://github.com/bitnami/containers docker-compose

javsalgar commented 7 months ago

I see that the docker-compose in redmine is a bit different: https://github.com/bitnami/containers/blob/main/bitnami/redmine/docker-compose.yml

Did you try with that one?

ffb04 commented 7 months ago

yes,switch to mariadb also has the same problem.

jotamartos commented 6 months ago

Hi @ffb04,

I just deployed a fresh Bitnami Redmine container using the default docker-compose.yml file and everything worked as expected

redmine-1  | redmine 14:52:54.99 INFO  ==> Executing database migrations
redmine-1  | redmine 14:52:55.01 DEBUG ==> Generating secret tokens
redmine-1  | redmine 14:53:03.12 INFO  ==> Updating admin user credentials
redmine-1  | redmine 14:53:03.13 DEBUG ==> Executing SQL command:
redmine-1  | UPDATE users SET login = 'user', hashed_password = '674d9f7bb97f6abce8e8fcd94304341241b7030a', salt = '4Um8TVT0Zx04zzNFhxdkjzVBY3tW1M7w', firstname = 'UserName', lastname = 'LastName', must_change_passwd = '0' WHERE id = '1';
redmine-1  | UPDATE email_addresses SET address = 'user@example.com' WHERE id = '1';
redmine-1  | /opt/bitnami/mysql/bin/mysql: Deprecated program name. It will be removed in a future release, use '/opt/bitnami/mysql/bin/mariadb' instead
redmine-1  | redmine 14:53:03.19 INFO  ==> Loading default configuration data
redmine-1  | Default configuration data loaded.
redmine-1  | redmine 14:53:06.35 INFO  ==> Persisting Redmine installation
redmine-1  | redmine 14:53:07.30 INFO  ==> ** Redmine setup finished! **
redmine-1  |
redmine-1  | redmine 14:53:07.36 INFO  ==> ** Starting Redmine **
redmine-1  | =============== Phusion Passenger(R) Standalone web server started ===============
redmine-1  | PID file: /opt/bitnami/redmine/passenger.3000.pid
redmine-1  | Log file: /opt/bitnami/redmine/log/passenger.3000.log
redmine-1  | Environment: production
redmine-1  | Accessible via: http://0.0.0.0:3000/

Please note that you are mounting several volumes

    volumes:
      - /web/redmine/data:/bitnami
      - /web/redmine/redmine_config:/opt/bitnami/redmine/config:rw
        #- /web/redmine/redmine_persistence:/bitnami/redmine:rw

when the default docker-compose.yml only mounts one to persist the configuration

    volumes:
      - 'redmine_data:/bitnami/redmine'

Please review what is persisted in the default configuration and replicate the information in the /web/redmine/data/ directory you have.

Thanks

ffb04 commented 6 months ago

ok,Thanks!