Skip to content

Commit 9a165e5

Browse files
author
Babak Gh
committedMar 23, 2017
dockerfile
1 parent 3d4a465 commit 9a165e5

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed
 

‎Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Generated by Cloud66 Starter
2+
FROM ruby:2.4
3+
4+
RUN apt-get update -qq && apt-get install -y build-essential nodejs
5+
6+
ENV APP_HOME /app
7+
RUN mkdir $APP_HOME
8+
WORKDIR $APP_HOME
9+
10+
ADD Gemfile* $APP_HOME/
11+
RUN bundle install
12+
13+
ADD . $APP_HOME

‎docker-compose.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Generated by Cloud66 Starter
2+
---
3+
web:
4+
build: .
5+
command: bundle exec rails server -e _env:RAILS_ENV
6+
ports:
7+
- "3000:3000"
8+
links:
9+
- postgresql
10+
- postgresql:postgresql.cloud66.local
11+
environment:
12+
- RAILS_ENV=production
13+
- RACK_ENV=production
14+
postgresql:
15+
image: postgresql

‎service.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Cloud66 Starter
2+
---
3+
services:
4+
5+
web:
6+
git_url: git@github.com:babakgh/rails-psql.git
7+
git_branch: master
8+
command: bundle exec rails server -e _env:RAILS_ENV
9+
build_command: /bin/sh -c "RAILS_ENV=_env:RAILS_ENV bundle exec rake db:schema:load"
10+
deploy_command: /bin/sh -c "RAILS_ENV=_env:RAILS_ENV bundle exec rake db:migrate"
11+
build_root: .
12+
ports:
13+
- container: 3000
14+
http: 80
15+
https: 443
16+
env_vars:
17+
RAILS_ENV: production
18+
RACK_ENV: production
19+
20+
databases:
21+
- postgresql

0 commit comments

Comments
 (0)
Please sign in to comment.