Skip to content

Commit dc01208

Browse files
authored
Remove DATABASE_URL environment variable (#11)
This fixes the issue where the test database wouldn't create and where sqlite3 configuration were ignored. Also adds explicit google chrome version, since previous Docker instructions failed due to a breaking change in Google Chrome 115+ releases.
1 parent ce91683 commit dc01208

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

appdev.Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,9 @@ COPY --chown=student:student Gemfile.lock /rails-template/Gemfile.lock
8484
RUN /bin/bash -l -c "bundle install"
8585

8686
# Install Google Chrome
87-
RUN sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | \
88-
tee -a /etc/apt/sources.list.d/google.list' && \
89-
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | \
90-
sudo apt-key add - && \
91-
sudo apt-get update && \
92-
sudo apt-get install -y google-chrome-stable libxss1
87+
RUN sudo apt-get update && sudo apt-get install -y libxss1
88+
RUN wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.198-1_amd64.deb && \
89+
sudo apt-get install -y ./google-chrome-stable_114.0.5735.198-1_amd64.deb
9390

9491
# Install Chromedriver (compatable with Google Chrome version)
9592
# See https://gerg.dev/2021/06/making-chromedriver-and-chrome-versions-match-in-a-docker-image/
@@ -122,7 +119,7 @@ RUN mkdir -p $PGDATA ~/.pg_ctl/bin ~/.pg_ctl/sockets \
122119
&& sudo setfacl -dR -m g:staff:rwx $PGDATA \
123120
&& sudo chmod 777 /var/run/postgresql
124121
ENV PATH="$PATH:$HOME/.pg_ctl/bin"
125-
ENV DATABASE_URL="postgresql://student@localhost"
122+
# ENV DATABASE_URL="postgresql://student@localhost"
126123
ENV PGHOSTADDR="127.0.0.1"
127124
ENV PGDATABASE="postgres"
128125

0 commit comments

Comments
 (0)