stringer-rss / stringer

A self-hosted, anti-social RSS reader.
MIT License
3.89k stars 393 forks source link

DATABASE_URL ignored #498

Closed captn3m0 closed 3 years ago

captn3m0 commented 5 years ago

I keep getting a PG Connection error, despite setting a valid DATABASE_URL

PG::ConnectionBad at /
could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? 

Running on docker. From within the container:

bundle exec env
HOSTNAME=9c616a38dd0b
GEM_HOME=/usr/local/bundle
TERM=xterm
SUPERCRONIC=supercronic-linux-amd64
SECRET_TOKEN=51469747147b81d3076c309d29493e1129003e84fbb621c2d9651b044db86d75
LC_ALL=C.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
BUNDLE_SILENCE_ROOT_WARNING=1
SUPERCRONIC_SHA1SUM=96960ba3207756bb01e6892c978264e5362e117e
BUNDLE_APP_CONFIG=/usr/local/bundle
RACK_ENV=development
PATH=/app/vendor/bundle/ruby/2.3.0/bin:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUBY_DOWNLOAD_SHA256=1a4fa8c2885734ba37b97ffdb4a19b8fba0e8982606db02d936e65bac07419dc
PWD=/app
RUBY_MAJOR=2.3
RUBYGEMS_VERSION=2.6.11
BUNDLE_BIN=/usr/local/bundle/bin
SHLVL=1
HOME=/home/stringer
BUNDLE_PATH=/usr/local/bundle
SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64
PORT=8080
RUBY_VERSION=2.3.3
DATABASE_URL=sqlite3:':memory:'
BUNDLER_VERSION=1.14.6
_=/usr/local/bin/bundle
BUNDLER_ORIG_PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
BUNDLE_BIN_PATH=/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/exe/bundle
BUNDLE_GEMFILE=/app/Gemfile
RUBYOPT=-rbundler/setup
RUBYLIB=/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib

I've tried setting it to my postgres server URL as well, but it still keeps connecting to the socket.

mockdeep commented 5 years ago

@captn3m0 you've got your DATABASE_URL set to a sqlite3 database, but PG is a postgres adapter. Stringer doesn't have a production adapter configured, but I suspect it defaults to postgres, so you'll probably have to install that and set it for DATABASE_URL.

mockdeep commented 3 years ago

Closing due to inactivity.