nickthecook / archyve

GNU Affero General Public License v3.0
117 stars 15 forks source link

Change to config.yaml breaks server #101

Closed mattlindsey closed 4 weeks ago

mattlindsey commented 4 weeks ago

Latest commit on main changes environment filename from .local.env to .env but broke my local installation. I renamed .local.env to .env, deleted the docker container, did 'ops down' then 'ops up,' dropped the db and ran db:setup, but server fails to start. Any ideas?


➜  archyve git:(main) ✗ ops server
Running `overmind start -f Procfile.dev` in environment 'dev'...
system  | Tmux socket name: overmind-archyve-RCOToZc8_IRFSAPehuhVC
system  | Tmux session ID: archyve
system  | Listening at ./.overmind.sock
css     | Started with pid 99297...
opp     | Started with pid 99300...
web     | Started with pid 99296...
jobs    | Started with pid 99298...
llmjobs | Started with pid 99299...
opp     | => Booting Puma
opp     | => Rails 7.1.3.2 application starting in development
opp     | => Run `bin/rails server --help` for more startup options
web     | => Booting Puma
web     | => Rails 7.1.3.2 application starting in development
web     | => Run `bin/rails server --help` for more startup options
opp     | Exiting
opp     | /Users/mattlindsey/github/archyve/vendor/bundle/ruby/3.1.0/gems/json-2.7.2/lib/json/common.rb:220:in `parse': unexpected token at '\\"localhost\\", \\"host.docker.internal\\"]' (JSON::ParserError)
opp     |   from /Users/mattlindsey/github/archyve/vendor/bundle/ruby/3.1.0/gems/json-2.7.2/lib/json/common.rb:220:in `parse'
opp     |   from /Users/mattlindsey/github/archyve/config/environments/development.rb:82:in `block in <main>'
opp     |   from /Users/mattlindsey/github/archyve/vendor/bundle/ruby/3.1.0/gems/railties-7.1.3.2/lib/rails/railtie.rb:257:in `instance_eval'
opp     |   from /Users/mattlindsey/github/archyve/vendor/bundle/ruby/3.1.0/gems/railties-7.1.3.2/lib/rails/railtie.rb:257:in `configure'
opp     |   from /Users/mattlindsey/github/archyve/config/environments/development.rb:3:in `<main>'
nickthecook commented 4 weeks ago

It will be some variation of a required environment variable not being set.

Between Mac and Linux, Docker Desktop and Podman Machine, people running docker as their regular user and people running docker as root, this stuff is really hard to test.

I'm reverting the breaking change right now, and will try to fix that other issue someday.

mattlindsey commented 4 weeks ago

Yeah. Looks confusing. It might be REDIS_URL in .env. I discovered that running locally on my Mac, your change doesn't break anything if I comment out all of the lines in .env, but it breaks if I just uncomment the REDIS_URL line.