Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] dockerfiles #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile.backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM hokui/ruby_nginx_base

RUN apt-get -yqq install git-core zlib1g-dev sqlite3 libsqlite3-dev

WORKDIR /tmp

ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN bundle install --jobs=4

ADD . /var/app
WORKDIR /var/app
RUN mkdir public

ENV RAILS_ENV=production

EXPOSE 3001

VOLUME ["/var/app/log"]

ENTRYPOINT ["rails", "s", "-p", "3001"]
21 changes: 21 additions & 0 deletions Dockerfile.console
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM hokui/ruby_nginx_base

RUN apt-get -yqq install git-core zlib1g-dev sqlite3 libsqlite3-dev

WORKDIR /tmp

ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN bundle install --jobs=4

ADD . /var/app
WORKDIR /var/app
RUN mkdir public

ENV RAILS_ENV=production

EXPOSE 3001

VOLUME ["/var/app/log"]

ENTRYPOINT ["rails", "c"]
23 changes: 23 additions & 0 deletions Dockerfile.cron
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM hokui/ruby_nginx_base

RUN apt-get -yqq install git-core zlib1g-dev sqlite3 libsqlite3-dev cron

WORKDIR /tmp

ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN bundle install --jobs=4

ADD . /var/app
WORKDIR /var/app
RUN mkdir public

ENV RAILS_ENV=production

EXPOSE 3001

VOLUME ["/var/app/log"]

RUN wheneverize .

ENTRYPOINT ["cron" "-f"]
14 changes: 3 additions & 11 deletions Dockerfile → Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM hokui/ruby_nginx_base

RUN apt-get -yqq install nodejs nodejs-legacy npm git-core supervisor zlib1g-dev sqlite3 libsqlite3-dev
RUN apt-get -yqq install nodejs nodejs-legacy npm git-core

WORKDIR /tmp

ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN bundle install --jobs=4

ADD package.json package.json
RUN npm install

Expand All @@ -20,20 +16,16 @@ RUN rm -v /etc/nginx/mime.types
ADD nginx/nginx.conf /etc/nginx/
ADD nginx/mime.types /etc/nginx/

ADD docker_supervisor.conf /etc/supervisor/conf.d/supervisord.conf

ADD . /var/app
WORKDIR /var/app
RUN mkdir public

ENV RAILS_ENV=production

RUN cp -r /tmp/node_modules /var/app/node_modules
RUN cp -r /tmp/bower_components /var/app/public/bower_components
RUN gulp build --prod --nosound

EXPOSE 8001

VOLUME ["/var/log/supervisor", "/var/log/nginx", "/var/app/log"]
VOLUME ["/var/log/hokui/nginx"]

ENTRYPOINT ["bash", "run.sh"]
ENTRYPOINT ["nginx"]
8 changes: 0 additions & 8 deletions docker_supervisor.conf

This file was deleted.