opf / opf/openproject-docker-compose

docker-compose deployment errors on first start up

Open
#49 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
342
Forks
315
PR merge metrics
No merged PRs in 30d

Description

On a clean server with a fresh docker install, the deployment of OpenProject using the docker-compose.yml in this repository results in a number of errors. Running:

❯ git clone https://github.com/opf/openproject-deploy --depth=1 --branch=stable/12 openproject
❯ cd openproject/compose
❯ docker compose pull
❯ OPENPROJECT_HTTPS=false docker compose up

will result in the following stack trace (and ultimately many more but those may be caused by this):

lars-web-1       | 20230105134940_work_package_date_indices.rb
lars-web-1       |
lars-web-1       |
lars-web-1       |      from /app/config/initializers/06-pending_migrations_check.rb:34:in `<top (required)>'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/engine.rb:667:in `load'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/engine.rb:667:in `block in load_config_initializer'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4.1/lib/active_support/notifications.rb:208:in `instrument'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/engine.rb:666:in `load_config_initializer'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/engine.rb:619:in `each'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/engine.rb:619:in `block in <class:Engine>'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/initializable.rb:32:in `instance_exec'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/initializable.rb:32:in `run'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/initializable.rb:50:in `each'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/initializable.rb:50:in `tsort_each_child'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:415:in `call'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:415:in `each_strongly_connected_component_from'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `each'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `call'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
lars-web-1       |      from /usr/local/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/initializable.rb:60:in `run_initializers'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/application.rb:372:in `initialize!'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/railtie.rb:226:in `public_send'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/railtie.rb:226:in `method_missing'
lars-web-1       |      from /app/config/environment.rb:32:in `<top (required)>'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
lars-web-1       |      from config.ru:31:in `block in <main>'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/builder.rb:116:in `eval'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/builder.rb:116:in `new_from_string'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/builder.rb:105:in `load_file'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/builder.rb:66:in `parse_file'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/server.rb:349:in `build_app_and_options_from_config'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/server.rb:249:in `app'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/server.rb:422:in `wrapped_app'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/server.rb:312:in `block in start'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/server.rb:379:in `handle_profiling'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.6.2/lib/rack/server.rb:311:in `start'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/commands/server/server_command.rb:38:in `start'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/commands/server/server_command.rb:143:in `block in perform'
lars-web-1       |      from <internal:kernel>:90:in `tap'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/commands/server/server_command.rb:134:in `perform'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/command/base.rb:87:in `perform'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/command.rb:48:in `invoke'
lars-web-1       |      from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4.1/lib/rails/commands.rb:18:in `<top (required)>'
lars-web-1       |      from bin/rails:9:in `require'
lars-web-1       |      from bin/rails:9:in `<main>'
lars-db-1        | 2023-03-13 18:58:15.873 UTC [76] ERROR:  relation "users" does not exist at character 491
lars-db-1        | 2023-03-13 18:58:15.873 UTC [76] STATEMENT:  SELECT a.attname, format_type(a.atttypid, a.atttypmod),
lars-db-1        |             pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
lars-db-1        |             c.collname, col_description(a.attrelid, a.attnum) AS comment,
lars-db-1        |             attgenerated as attgenerated
lars-db-1        |        FROM pg_attribute a
lars-db-1        |        LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
lars-db-1        |        LEFT JOIN pg_type t ON a.atttypid = t.oid
lars-db-1        |        LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
lars-db-1        |       WHERE a.attrelid = '"users"'::regclass
lars-db-1        |         AND a.attnum > 0 AND NOT a.attisdropped
lars-db-1        |       ORDER BY a.attnum
lars-db-1        |
lars-worker-1    | rake aborted!
lars-worker-1    | ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "users" does not exist
lars-worker-1    | LINE 9:  WHERE a.attrelid = '"users"'::regclass
lars-worker-1    |                             ^

Full log: op.log

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported commands from the compose directory using the stable/12 checkout, then inspect docker-compose.yml, the web and worker services, and config/initializers/06-pending_migrations_check.rb alongside the linked full log. Done means a clean Docker installation can start the deployment without the migration and missing users-table errors shown here.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, postgresql, ruby
Domain
backend, databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.