Skip to content

Commit

Permalink
Revert "Align docker configuration with workflow-service"
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo committed Sep 24, 2019
1 parent 3bd1f5e commit 633567c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 54 deletions.
9 changes: 7 additions & 2 deletions .circleci/config.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
PGUSER: circleci-demo-ruby
RAILS_ENV: test
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
- image: circleci/postgres:9.6-alpine
- image: circleci/postgres:10
environment:
POSTGRES_USER: postgres
POSTGRES_DB: dor_services
Expand Down Expand Up @@ -51,7 +51,12 @@ jobs:
paths:
- vendor/bundle

- run: sudo apt update && sudo apt install -y postgresql-client || true
# Need `psql` command when you store the app schema as SQL instead of as Ruby
- run:
name: Install postgresql client
command: |
sudo apt update -y
sudo apt install -y postgresql-client || true
- run:
name: Wait for DB
Expand Down
17 changes: 5 additions & 12 deletions Dockerfile
@@ -1,4 +1,4 @@
FROM ruby:2.5.3-alpine
FROM ruby:2.5-stretch

# Provide SSL defaults that work in dev/test environments where we do not require connections to secured services
# These values are overrideable at both buildtime and runtime (hence the ARG/ENV combo).
Expand All @@ -9,22 +9,15 @@ ENV SETTINGS__SSL__CERT_FILE="${SETTINGS__SSL__CERT_FILE}"
ENV SETTINGS__SSL__KEY_FILE="${SETTINGS__SSL__KEY_FILE}"
ENV SETTINGS__SSL__KEY_PASS="${SETTINGS__SSL__KEY_PASS}"

# postgresql-client is required for invoke.sh
RUN apk --no-cache add \
postgresql-dev \
postgresql-client \
tzdata
RUN apt-get update -qq && \
apt-get install -y nano build-essential libsqlite3-dev nodejs

RUN mkdir /app
WORKDIR /app

COPY Gemfile Gemfile.lock ./

RUN apk --no-cache add --virtual build-dependencies \
build-base \
&& bundle install --without production \
&& apk del build-dependencies
RUN bundle install --without production

COPY . .

CMD ["./docker/invoke.sh"]
CMD puma -C config/puma.rb
21 changes: 7 additions & 14 deletions docker-compose.yml
Expand Up @@ -13,16 +13,9 @@ services:
- workflow
- redis
- workers
- db
ports:
- 3000:3000
environment:
DATABASE_NAME: dor_services
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: sekret
DATABASE_HOSTNAME: db
DATABASE_PORT: 5432
RAILS_LOG_TO_STDOUT: 'true'
REDIS_URL: redis://redis:6379/
SOLR_URL: http://solr:8983/solr/dorservices
SETTINGS__SSL__CERT_FILE: /app/spec/support/certs/spec.crt
Expand Down Expand Up @@ -76,14 +69,14 @@ services:
ports:
- 3001:3000
environment:
DATABASE_NAME: workflow-server
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: sekret
DATABASE_HOSTNAME: db
DATABASE_PORT: 5432
SETTINGS__REDIS__HOSTNAME: redis
- DATABASE_NAME=workflow-server
- DATABASE_USERNAME=postgres
- DATABASE_PASSWORD=sekret
- DATABASE_HOSTNAME=db
- DATABASE_PORT=5432
- SETTINGS__REDIS__HOSTNAME=redis
db:
image: postgres:9.5-alpine
image: postgres:10
ports:
- 5432:5432
environment:
Expand Down
26 changes: 0 additions & 26 deletions docker/invoke.sh

This file was deleted.

0 comments on commit 633567c

Please sign in to comment.