Helpy is a modern, open source helpdesk customer support application. Features include knowledgebase, community discussions and support tickets integrated with email.
PG::ConnectionBad: could not connect to server: No such file or directory
helpy_1 | Is the server running locally and accepting
helpy_1 | connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
It looks like the helpy image can not communicate with the postgres service
add the slack integration gem to the Gemfile if the HELPY_SLACK_INTEGRATION_ENABLED is true
use test for sh compatibility, also use only one =. also for sh compatibility
RUN test "$HELPY_SLACK_INTEGRATION_ENABLED" = "true" && sed -i '128i\gem "helpy_slack", git: "https://github.com/helpyio/helpy_slack.git", branch: "master"' $HELPY_HOME/Gemfile
RUN bundle install
RUN mkdir -p /helpy/log
RUN touch /helpy/log/production.log && chmod 0664 /helpy/log/production.log
Due to a weird issue with one of the gems, execute this permissions change:
RUN chmod +r /usr/local/bundle/gems/griddler-mandrill-1.1.3/lib/griddler/mandrill/adapter.rb
manually create the /helpy/public/assets folder and give the helpy user rights to it
this ensures that helpy can write precompiled assets to it
RUN mkdir -p $HELPY_HOME/public/assets && chown $HELPY_USER $HELPY_HOME/public/assets
waiting 5 seconds for postgres.. helpy_1 | postgres is now avaliable helpy_1 | DO_NOT_PREPARE is not set or is false, preparing.. helpy_1 |/home/helpyuseris not a directory. helpy_1 | Bundler will use/tmp/bundler/home/unknown' as your home directory temporarily.
helpy_1 | fatal: Not a git repository (or any parent up to mount point /helpy)
helpy_1 | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
helpy_1 | /home/helpyuser is not a directory.
helpy_1 | Bundler will use /tmp/bundler/home/unknown' as your home directory temporarily. helpy_1 | fatal: Not a git repository (or any parent up to mount point /helpy) helpy_1 | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). helpy_1 | rake aborted! helpy_1 | PG::ConnectionBad: could not connect to server: No such file or directory helpy_1 | Is the server running locally and accepting helpy_1 | connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:ininitialize'
helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in new' helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:inconnect'
helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
When use "docker-compose up" this error appears.
PG::ConnectionBad: could not connect to server: No such file or directory helpy_1 | Is the server running locally and accepting helpy_1 | connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
It looks like the helpy image can not communicate with the postgres service
Can someone help me?
Dockerfile
`FROM ruby:2.4
ENV HELPY_VERSION=master \ RAILS_ENV=production \ HELPY_HOME=/helpy \ HELPY_USER=helpyuser \ HELPY_SLACK_INTEGRATION_ENABLED=true
RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y nodejs postgresql-client imagemagick --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ && useradd --no-create-home $HELPY_USER \ && mkdir -p $HELPY_HOME \ && chown -R $HELPY_USER:$HELPY_USER $HELPY_HOME /usr/local/lib/ruby /usr/local/bundle
WORKDIR $HELPY_HOME
USER $HELPY_USER
COPY . .
add the slack integration gem to the Gemfile if the HELPY_SLACK_INTEGRATION_ENABLED is true
use
test
for sh compatibility, also use only one=
. also for sh compatibilityRUN test "$HELPY_SLACK_INTEGRATION_ENABLED" = "true" && sed -i '128i\gem "helpy_slack", git: "https://github.com/helpyio/helpy_slack.git", branch: "master"' $HELPY_HOME/Gemfile
RUN bundle install
RUN mkdir -p /helpy/log
RUN touch /helpy/log/production.log && chmod 0664 /helpy/log/production.log
Due to a weird issue with one of the gems, execute this permissions change:
RUN chmod +r /usr/local/bundle/gems/griddler-mandrill-1.1.3/lib/griddler/mandrill/adapter.rb
manually create the /helpy/public/assets folder and give the helpy user rights to it
this ensures that helpy can write precompiled assets to it
RUN mkdir -p $HELPY_HOME/public/assets && chown $HELPY_USER $HELPY_HOME/public/assets
VOLUME $HELPY_HOME/public
COPY docker/database.yml $HELPY_HOME/config/database.yml
COPY docker/run.sh $HELPY_HOME/run.sh
CMD ["./docker/run.sh"] `
dabase.yml
`version: '2'
services: frontend: image: webwurst/caddy volumes:
environment:
- DO_NOT_PREPARE=true
depends_on:
volumes: rails-assets: driver: local
networks: front: driver: bridge back: driver: bridge `
log
waiting 5 seconds for postgres.. helpy_1 | postgres is now avaliable helpy_1 | DO_NOT_PREPARE is not set or is false, preparing.. helpy_1 |
/home/helpyuseris not a directory. helpy_1 | Bundler will use
/tmp/bundler/home/unknown' as your home directory temporarily. helpy_1 | fatal: Not a git repository (or any parent up to mount point /helpy) helpy_1 | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). helpy_1 |/home/helpyuser
is not a directory. helpy_1 | Bundler will use/tmp/bundler/home/unknown' as your home directory temporarily. helpy_1 | fatal: Not a git repository (or any parent up to mount point /helpy) helpy_1 | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). helpy_1 | rake aborted! helpy_1 | PG::ConnectionBad: could not connect to server: No such file or directory helpy_1 | Is the server running locally and accepting helpy_1 | connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in
initialize' helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:innew' helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in
connect' helpy_1 | /usr/local/bundle/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'...
`