diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ad5a6452 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM ruby:2.5.8-slim-buster + +RUN apt-get update \ + && apt-get install -y \ + nodejs npm + +RUN npm install -g yarn +RUN gem install rails +RUN gem install bundler + +RUN mkdir /app +COPY . /app +WORKDIR /app + +RUN yarn +RUN bundle install + +ENTRYPOINT ["foreman", "start"] diff --git a/Gemfile b/Gemfile index 36493d92..c86e5d8d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.5.7' +ruby '2.5.8' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.3' diff --git a/config/mongoid.yml b/config/mongoid.yml index be5cff6d..4528f3e7 100644 --- a/config/mongoid.yml +++ b/config/mongoid.yml @@ -9,7 +9,7 @@ development: # Provides the hosts the default client can connect to. Must be an array # of host:port pairs. (required) hosts: - - localhost:27017 + - 192.168.1.238:27017 options: safe: true # Note that all options listed below are Ruby driver client options (the mongo gem). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..d0ddb940 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: '3.6' + +services: + db: + image: mongo:latest + volumes: + - /data/db:/data/db + app: + image: bedpost/bedpost:latest + ports: + - 3000:3000 + links: + - db