Add fizzy-app-102 as a replica

The setup here is a bit rough while we settle some of the details, but
the gist of it is:

- Define accessories to run the primary/replica processes
- Add a web-replica role, which is similar to web but has the
  replication-side accessory
- Load the beamer extension on the app's primary tenanted database

Note that we aren't sending any traffic into the replica yet, but it
would be functional to do so. This stage is mainly about testing the
database replication.
This commit is contained in:
Kevin McConnell
2025-04-16 16:51:29 +01:00
parent 622d7c396a
commit 91df76928b
4 changed files with 43 additions and 3 deletions
+5
View File
@@ -38,6 +38,10 @@ RUN bundle exec bootsnap precompile app/ lib/
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
# Fetch beamer library
FROM basecamp/beamer:latest AS beamer
# Final stage for app image
FROM base
@@ -49,6 +53,7 @@ RUN apt-get update -qq && \
# Copy built artifacts: gems, application
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY --from=build /rails /rails
COPY --from=beamer /home/beamer/bin/beamer.so /rails/bin/lib/beamer.so
# Run and own only the runtime files as a non-root user for security
RUN useradd rails --create-home --shell /bin/bash && \