Docker-compos does no work out of the box

Tried to follow the instructions here Docker | Lago documentation to run docker-compose.
It was failing to download images. After I updated tags to V0.1.2-alpha API and Worker containers could not star

Hello Denis!

Can you paste the full trace to see exactly whats the error coming from?

Cheers,
Jeremy

lago-clock    | bundler: failed to load command: clockwork (/usr/local/bundle/bin/clockwork)
lago-clock    | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-clock    |         from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-clock    |         from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-clock    |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock    |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-clock    |         from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-clock    |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-clock    |         from /app/config/environment.rb:7:in `<main>'
lago-clock    |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock    |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock    |         from /app/clock.rb:5:in `<top (required)>'
lago-clock    |         from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `require'
lago-clock    |         from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `<top (required)>'
lago-clock    |         from /usr/local/bundle/bin/clockwork:23:in `load'
lago-clock    |         from /usr/local/bundle/bin/clockwork:23:in `<top (required)>'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-clock    |         from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-clock    |         from /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-clock    |         from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-clock    |         from /usr/local/bin/bundle:23:in `load'
lago-clock    |         from /usr/local/bin/bundle:23:in `<main>'
lago-api      | => Booting Puma
lago-api      | => Rails 7.0.3 application starting in production
lago-api      | => Run `bin/rails server --help` for more startup options
lago-clock exited with code 1
lago-api      | Exiting
lago-api      | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-api      |         from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-api      |         from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-api      |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api      |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-api      |         from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-api      |         from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-api      |         from /app/config/environment.rb:7:in `<main>'
lago-api      |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api      |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api      |         from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
lago-api      |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
lago-api      |         from config.ru:3:in `block in <main>'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `eval'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `new_from_string'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:105:in `load_file'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:66:in `parse_file'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:349:in `build_app_and_options_from_config'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:249:in `app'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:422:in `wrapped_app'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:312:in `block in start'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:379:in `handle_profiling'
lago-api      |         from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:311:in `start'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:38:in `start'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:143:in `block in perform'
lago-api      |         from <internal:kernel>:90:in `tap'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:134:in `perform'
lago-api      |         from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
lago-api      |         from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
lago-api      |         from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/command/base.rb:87:in `perform'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/command.rb:48:in `invoke'
lago-api      |         from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands.rb:18:in `<main>'
lago-api      |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api      |         from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api      |         from bin/rails:4:in `<main>'
lago-worker   | 2022-06-07T09:55:01.032Z pid=8 tid=2qo WARN: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-worker   | 2022-06-07T09:55:01.032Z pid=8 tid=2qo WARN: /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-worker   | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-worker   | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-worker   | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker   | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-worker   | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-worker   | /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-worker   | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-worker   | /app/config/environment.rb:7:in `<top (required)>'
lago-worker   | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `require'
lago-worker   | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `boot_application'
lago-worker   | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:37:in `run'
lago-worker   | /usr/local/bundle/gems/sidekiq-6.4.1/bin/sidekiq:31:in `<top (required)>'
lago-worker   | /usr/local/bundle/bin/sidekiq:23:in `load'
lago-worker   | /usr/local/bundle/bin/sidekiq:23:in `<top (required)>'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-worker   | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-worker   | /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-worker   | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-worker   | /usr/local/bin/bundle:23:in `load'
lago-worker   | /usr/local/bin/bundle:23:in `<main>'
lago-api exited with code 1
lago-worker exited with code 1

Thanks!
It looks like it miss the RSA_PRIVATE_KEY, did you set it up in your docker-compose file or as a local environment variable?

You can run this command to set it up

export LAGO_RSA_PRIVATE_KEY=$(openssl genrsa 2048 | base64)

That worked. Thanks.
Is there anything else I should configure?
Now when I try to signup or login, I’m getting this:

Looks like the front can’t join the API.
What’s the value you have in your LAGO_API_URL ?

It’s API_URL=http://localhost:3000 in a lago-front container

It was a cors issue because I was using 127.0.0.1 instead of localhost

ha perfect, we’ll update our doc about all of those!

1 Like

Now getting this when trying to select a newly added customer :smiley:

Just checked and I can’t reproduce it with the V0.1.2-alpha version, can you share me your docker-compose.yml file?

version: "3.8"

volumes:
  lago_postgres_data:
  lago_redis_data:

services:
  db:
    image: postgres:14.0-alpine
    container_name: lago-db
    restart: unless-stopped
    environment:
      POSTGRES_DB: ${POSTGRES_DB:-lago}
      POSTGRES_USER: ${POSTGRES_USER:-lago}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
      PGDATA: /data/postgres
    volumes:
      - lago_postgres_data:/data/postgres
    ports:
      - ${POSTGRES_PORT:-5432}:5432

  redis:
    image: redis:6.2-alpine
    container_name: lago-redis
    restart: unless-stopped
    volumes:
      - lago_redis_data:/data
    ports:
      - ${REDIS_PORT:-6379}:6379

  api:
    container_name: lago-api
    image: getlago/api:latest
    restart: unless-stopped
    depends_on:
      - db
      - redis
    command: ["./scripts/start.sh"]
    environment:
      - DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}
      - REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}
      - SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
      - RAILS_ENV=production
      - SENTRY_DSN=${SENTRY_DSN}
      - LAGO_FRONT_URL=${LAGO_FRONT_URL:-http://localhost}
      - RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded
      - LAGO_SIDEKIQ_WEB=${LAGO_SIDEKIQ_WEB}

    ports:
      - ${API_PORT:-3000}:3000

  front:
    container_name: lago-front
    image: getlago/front:V0.1.2-alpha
    restart: unless-stopped
    depends_on:
      - api
    environment:
      - API_URL=${LAGO_API_URL:-http://localhost:3000}
      - APP_ENV=${APP_ENV:-production}
      - CODEGEN_API=${LAGO_API_URL:-http://localhost:3000}
    ports:
      - ${FRONT_PORT:-80}:80

  api-worker:
    container_name: lago-worker
    image: getlago/api:V0.1.2-alpha
    restart: unless-stopped
    depends_on:
      - api
    command: ["./scripts/start.worker.sh"]
    environment:
      - LAGO_API_URL=${LAGO_API_URL:-http://localhost:3000}
      - DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}
      - REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}
      - SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
      - RAILS_ENV=production
      - SENTRY_DSN=${SENTRY_DSN}
      - RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded

  api-clock:
    container_name: lago-clock
    image: getlago/api:V0.1.2-alpha
    restart: unless-stopped
    depends_on:
      - api
    command: ["./scripts/start.clock.sh"]
    environment:
      - LAGO_API_URL=${LAGO_API_URL:-http://localhost:3000}
      - DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-lago}
      - REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}
      - SECRET_KEY_BASE=${SECRET_KEY_BASE:-your-secret-key-base-hex-64}
      - RAILS_ENV=production
      - SENTRY_DSN=${SENTRY_DSN}
      - RSA_PRIVATE_KEY=${LAGO_RSA_PRIVATE_KEY} # Should be base64 encoded

You should use getlago/api:V0.1.2-alpha for API too!
latest tag is not updated on our side since we do not recommend to use it for now

My bad. Missed that one
Thanks for helping though

No problem, we’ll update the doc about all the small things, thanks Denis!