Skip to content

Commit f5b5730

Browse files
mattwr18tansaku
authored andcommitted
Add dockeriziation (AgileVentures#2493)
1 parent 09a5bff commit f5b5730

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

.dockerignore

Whitespace-only changes.

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ruby:2.5
2+
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
3+
RUN mkdir /WebsiteOne
4+
WORKDIR /WebsiteOne
5+
COPY Gemfile /WebsiteOne/Gemfile
6+
COPY Gemfile.lock /WebsiteOne/Gemfile.lock
7+
RUN bundle install
8+
COPY . /WebsiteOne

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
ruby '2.5.0'
3+
ruby '2.5.1'
44

55
gem 'rails', '~> 5.1'
66
gem 'acts-as-taggable-on'

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ DEPENDENCIES
758758
zeus
759759

760760
RUBY VERSION
761-
ruby 2.5.0p0
761+
ruby 2.5.1p57
762762

763763
BUNDLED WITH
764764
1.16.2

config/database.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ development: &dev
33
encoding: unicode
44
database: websiteone_development
55
pool: 20
6+
host: db
67
username: postgres
7-
password:
8+
password:
89
test: &test
910
<<: *dev
1011
database: websiteone_test

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3'
2+
services:
3+
db:
4+
image: postgres
5+
volumes:
6+
- ./tmp/db:/var/lib/postgresql/data:rw
7+
web:
8+
build: .
9+
command: bundle exec rails s -p 3000 -b '0.0.0.0'
10+
volumes:
11+
- .:/WebsiteOne
12+
ports:
13+
- "3000:3000"
14+
depends_on:
15+
- db

0 commit comments

Comments
 (0)