mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
13
Dockerfile
13
Dockerfile
@@ -1,7 +1,7 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# Install all the requirements
|
||||
RUN apt-get update && apt-get install -y curl git build-essential software-properties-common wget zlib1g-dev libssl1.0-dev libreadline-dev libyaml-dev libffi-dev libxml2-dev libxslt1-dev wait-for-it
|
||||
RUN apt-get update && apt-get install -y curl git build-essential software-properties-common wget zlib1g-dev libssl1.0-dev libreadline-dev libyaml-dev libffi-dev libxml2-dev libxslt1-dev wait-for-it imagemagick unzip
|
||||
|
||||
# Setup ENV variables
|
||||
ENV PATH /usr/local/src/rbenv/shims:/usr/local/src/rbenv/bin:$PATH
|
||||
@@ -27,4 +27,15 @@ RUN sh -c "echo 'deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main'
|
||||
apt-get update && \
|
||||
apt-get install -yqq --no-install-recommends postgresql-client-9.5 libpq-dev
|
||||
|
||||
# Install Chrome
|
||||
RUN wget --quiet -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
sh -c "echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list.d/google-chrome.list" && \
|
||||
apt-get update && \
|
||||
apt-get install -fy google-chrome-stable
|
||||
|
||||
# Install Chromedriver
|
||||
RUN wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip && \
|
||||
unzip chromedriver_linux64.zip -d /usr/bin && \
|
||||
chmod u+x /usr/bin/chromedriver
|
||||
|
||||
COPY . /usr/src/app/
|
||||
|
||||
@@ -30,8 +30,8 @@ services:
|
||||
command: >
|
||||
bash -c "(bundle check || bundle install) &&
|
||||
wait-for-it -t 30 db:5432 &&
|
||||
bundle exec rake db:reset db:test:prepare &&
|
||||
bundle exec rake ofn:sample_data || true &&
|
||||
bundle exec rake db:reset &&
|
||||
bundle exec rake db:test:prepare ofn:sample_data || true &&
|
||||
rm -f tmp/pids/server.pid &&
|
||||
bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user