Skip to content

Conversation

@elasticspoon
Copy link
Collaborator

@elasticspoon elasticspoon commented Sep 11, 2025

removes DATABASE_URL from docker compose as it was preventing proper
running of tests (rspec would connect to dev db when running tests).

this also swaps to the same image the default rails new generates.

removes DATABASE_URL from docker compose as it was preventing proper
running of tests (rspec would connect to dev db when running tests).
@elasticspoon elasticspoon changed the title wip fix: improve dockerfile for staging use Sep 11, 2025
@elasticspoon elasticspoon marked this pull request as ready for review September 11, 2025 20:58
@@ -1,18 +1,26 @@
development:
host: 127.0.0.1
default: &default
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pysch issues with upgrade were causing an issue here, which is why the stanza got pulled out.

<<: *default
database: awbw_test

production:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using DATABASE_URL so there's no reason to set these except for configuration like pool size

# Only run if MySQL is the DB
if adapter.include?('mysql')
sql_file = Rails.root.join('db', 'awbw_dml_only.sql')
sql_file = Rails.root.join('db', 'awbw_dml_only.sql')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to fall out in the rebase from other PRs but solid catch,

build:
context: .
dockerfile: Dockerfile.dev # <— use the dev Dockerfile
dockerfile: Dockerfile
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're only using compose locally right? Or are you trying to get everything together in one place?

RUN apt-get update -qq && apt-get install -y \
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.3.8
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider locking this to the debian version we're shipping. Otherwise you can end up surprised when the rails docker team switched the base image underneath you 😄

@cflipse
Copy link
Collaborator

cflipse commented Sep 15, 2025

I think we maybe should close this?

@elasticspoon elasticspoon deleted the update-dockerfile branch September 15, 2025 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants