mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Update Postgres version into Docker Compose configuration
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -23,7 +23,9 @@ RUN apt-get update && apt-get install -y \
|
||||
imagemagick \
|
||||
unzip \
|
||||
libjemalloc-dev \
|
||||
libssl-dev
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
gnupg
|
||||
|
||||
# Setup ENV variables
|
||||
ENV PATH /usr/local/src/rbenv/shims:/usr/local/src/rbenv/bin:$PATH
|
||||
@@ -41,13 +43,13 @@ RUN git clone --depth 1 https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
||||
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh && \
|
||||
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install $(cat .ruby-version) && \
|
||||
rbenv global $(cat .ruby-version) && \
|
||||
gem install bundler --version=1.17.3
|
||||
gem install bundler --version=2.3.5
|
||||
|
||||
# Install Postgres
|
||||
RUN sh -c "echo 'deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > /etc/apt/sources.list.d/pgdg.list" && \
|
||||
wget --quiet -O - https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - && \
|
||||
RUN sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main' >> /etc/apt/sources.list.d/pgdg.list" && \
|
||||
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null && \
|
||||
apt-get update && \
|
||||
apt-get install -yqq --no-install-recommends postgresql-client-9.5 libpq-dev
|
||||
apt-get install -yqq --no-install-recommends postgresql-client-10 libpq-dev
|
||||
|
||||
# Install NodeJs and yarn
|
||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
|
||||
@@ -2,7 +2,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:9.5
|
||||
image: postgres:10.19
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: f00d
|
||||
@@ -36,7 +36,8 @@ services:
|
||||
command: >
|
||||
bash -c "wait-for-it -t 30 db:5432 &&
|
||||
rm -f tmp/pids/server.pid &&
|
||||
(bundle check || bundle install)
|
||||
(bundle check || bundle install) &&
|
||||
bundle exec rake db:create &&
|
||||
yarn install &&
|
||||
bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||
webpack:
|
||||
@@ -68,7 +69,7 @@ services:
|
||||
OFN_REDIS_JOBS_URL: redis://redis
|
||||
command: >
|
||||
bash -c "wait-for-it -t 30 db:5432 &&
|
||||
(bundle check || bundle install)
|
||||
(bundle check || bundle install) &&
|
||||
bundle exec sidekiq -q mailers -q default"
|
||||
volumes:
|
||||
gems:
|
||||
|
||||
Reference in New Issue
Block a user