-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a demo docker image #1017
Comments
With this demo image, we could set up a demo heroku instance to let people test the app before they clone the repo |
Is this issue still open? I would like to work on it. |
Thank you, yes that would be very helpful
…On Mon, 5 Jun 2023 at 20:02, Laurie Jefferson ***@***.***> wrote:
Is this issue still open? I would like to work on it.
—
Reply to this email directly, view it on GitHub
<#1017 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABENTQSJYTZ6E7YJD5YQ5LXJXDGJANCNFSM6AAAAAAQ6AAKYM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I forked the repo. Can this issue be assigned to me under 'Assignees'? Thanks. |
done |
Your Docker Compose file is pulling an image of postgres:9.5, which according to endoflife.date is deprecated. The official Postgres images on Docker Hub start with version 12.15-bullseye. Is your docker-compose.yml file out of date? |
it is; go ahead and bump this version |
Ruby is also out of date. The Dockerfile is using ruby:2.7, which is deprecated according to endoflife.date. The official Ruby image on Docker Hub starts at 3.0-alpine, docker-hub-ruby. Is the Dockerfile up to date? |
upgrading to Ruby 3.0 is kind of a bigger job. thats on my todo list after finishing the rails 7 migration. for now 2.7 should be fine |
I'm having a similar issue as #961 when I run docker-compose. I created the two volumes pgdata and gems and run docker-compose up. Docker can create the /home/app directory, but it hangs on the RUN step and takes a really long time to run the apt-get commands (250s): Here's the error output. Rails doesn't appear to be able to connect to Postgres, from the error on lines 422-425. |
Thank you Laurie, I think there are a couple of issues here...
ActiveRecord::ConnectionNotEstablished: could not connect to server: No
such file or directory
#0 232.7 Is the server running locally and accepting#0 232.7
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
As you say, postgres is not contactable... it's looking for a unix socket
rather than a TCP host. I can see you're copying the correct
config/database.postgres.docker.yml file which _should_ switch ActiveRecord
into TCP mode rather than UNIX socket but it doesn't appear to be working.
If you aren't already doing this, you could try setting the environment
variables in that file DB_USERNAME, DB_PASSWORD, DB_HOST, DB_PORT,
DB_DATABASE to values that docker compose is setting up for the DB
instance, that might be enough to trigger the change.
Secondly, FFCRM shouldn't need database access to run rake assets:compile
in the first place... this is a bug I am currently in the process of fixing
and will submit a PR shortly. Once merged, you'll likely need to update to
the latest master anyway.
Hope that helps and thanks for looking into this.
Regards,
Steve
…On Tue, 6 Jun 2023 at 02:12, Laurie Jefferson ***@***.***> wrote:
I'm having a similar issue as #960
<#960> when I run
docker-compose. I created the two volumes pgdata and gems and run
docker-compose up. Docker can create the /home/app directory, but it hangs
on the RUN step and takes a really long time to run the apt-get commands
(250s): Here's the error output
<https://hastebin.com/share/omajisakab.shell>. Rails doesn't appear to be
able to connect to Postgres, from the error on lines 422-425.
—
Reply to this email directly, view it on GitHub
<#1017 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABENTWN3NZ7BR2QTSV3UMDXJYOQPANCNFSM6AAAAAAQ6AAKYM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Ref PR #1121 |
Steve, I tried setting the env variables to the values in docker-compose, which gave me a new error "could not translate host name "db" to address: Name or service not known". I then tried setting the host: host.docker.internal in the database.postgres.docker.yml file, and got the original "could not establish a connection" error message. I'll continue once PR #1121 is completed. |
the issue youre experiencing is probably unrelated to the PR Steve is fixing. try deploying the postgres container using docker compose, then creating a side container and seeing if you can use the CLI to resolve the hostname of the pg container. may require tinkering with the docker compose yml |
@steveyken @johnbumgardner @brynary @olleolleolle Please see PR #1123. Can this issue be closed? |
If we have a docker image with demo data loaded, we could use this as a way to 'snap back' the data to a clean state once a day. This would enable the demo to get up and running again.
The text was updated successfully, but these errors were encountered: