March 2025
Intermediate to advanced
472 pages
12h 10m
English
We start with the Dockerfile. You will be making two -- or possibly three -- changes to the file. In the base image you will be changing sqlite3 to postgresql-client and libpq-dev:
| | apt-get install ... postgresql-client libpq-dev ... && \ |
If you are running Ruby 3.3.4, you will also need to make a change to the build image to work around a bug with that Ruby release.[88] Inserting the following line after the COPY Gemfile line:
| | RUN sed -i "/net-pop (0.1.2)/a\ net-protocol" Gemfile.lock |
Iinstall a database adapter for PostgreSQL:
| | $ bundle add pg --group production |
In seeds.rb you will be adding a user to the seed data:
| | User.create! name: 'dave', |
| | password: Rails.application.credentials ... |
Read now
Unlock full access