File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM ruby:2.6.0
2
+
3
+ RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
4
+ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
5
+ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
6
+ apt-get update && \
7
+ apt-get install -qq -y build-essential nodejs yarn \
8
+ libpq-dev postgresql-client
9
+ RUN mkdir /myapp
10
+ WORKDIR /myapp
11
+ COPY . /myapp
12
+ RUN bundle install
13
+ RUN yarn install --check-files
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ default: &default
28
28
development :
29
29
<< : *default
30
30
database : sample_post_api_development
31
+ host : db
32
+ port : 5432
31
33
32
34
# The specified database role being used to connect to postgres.
33
35
# To create additional roles in postgres see `$ createuser --help`.
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+ services :
3
+ db :
4
+ image : postgres:10.10
5
+ volumes :
6
+ - pgdata:/var/lib/postgresql/data
7
+ ports :
8
+ - " 5433:5432"
9
+ web :
10
+ build : .
11
+ command : bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
12
+ volumes :
13
+ - .:/myapp
14
+ ports :
15
+ - " 3000:3000"
16
+ depends_on :
17
+ - db
18
+ volumes :
19
+ pgdata :
You can’t perform that action at this time.
0 commit comments