Skip to content

Commit

Permalink
more docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
ZubKonst committed Dec 1, 2014
1 parent 0e9d9ec commit 4b2988f
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 25 deletions.
8 changes: 0 additions & 8 deletions Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
upstream sidekiq_web_server {
server unix:/var/www/pirozhki/shared/pids/sidekiq_web.sock fail_timeout=0;
server unix:/home/app/pirozhki/shared/pids/sidekiq_web.sock fail_timeout=0;
}

server {
Expand Down
5 changes: 2 additions & 3 deletions config/nginx_examples/sidekiq → config/nginx/sidekiq.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
upstream sidekiq_web_server {
server unix:/var/www/pirozhki/shared/pids/sidekiq_web.sock fail_timeout=0;
server unix:/home/app/pirozhki/pids/sidekiq_web.sock fail_timeout=0;
}

server {
listen 80;
server_tokens off;
server_name _;

keepalive_timeout 5;
client_max_body_size 10m;
client_body_buffer_size 1m;

root /var/www/pirozhki/current/public;
root /home/app/pirozhki/public;
try_files $uri/index.html $uri.html $uri @sidekiq_web_variable;

location @sidekiq_web_variable {
Expand Down
2 changes: 1 addition & 1 deletion config/variables/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ development:

production:
<<: *default_settings
app_path: /var/www/pirozhki/current
app_path: /home/app/pirozhki/current
web:
username: admin
password: REPLACE_ME
Expand Down
2 changes: 1 addition & 1 deletion config/variables/deploy_sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ production:
:domain: user@127.0.0.1
:repository: git@github.com:ZubKonst/pirozhki.git
:branch: master
:deploy_to: /var/www/pirozhki
:deploy_to: /home/app/pirozhki
:rvm_ruby_string: ruby-2.1.2@pirozhki

20 changes: 20 additions & 0 deletions dev_ops/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM phusion/passenger-ruby21
MAINTAINER Konstantin Zub "hello@zubkonst.com"

CMD ["/sbin/my_init"]

#RUN apt-get update -qq && apt-get install -y build-essential libpq-dev
RUN rm -f /etc/service/nginx/down
ADD config/nginx/sidekiq.conf /etc/nginx/sites-enabled/sidekiq.conf

RUN mkdir /home/app/pirozhki
WORKDIR /home/app/pirozhki/

ADD Gemfile /home/app/pirozhki/Gemfile
ADD Gemfile.lock /home/app/pirozhki/Gemfile.lock
RUN bundle install

ADD . /home/app/pirozhki

# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
File renamed without changes.
34 changes: 34 additions & 0 deletions dev_ops/fig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
db:
image: postgres
environment:
POSTGRES_USER: pirozhki
POSTGRES_PASSWORD: mysecretpassword
volumes_from:
- db_volume
db_volume:
volumes:
- tmp/:/var/lib/postgresql/data \ postgres

redis:
image: redis
command: redis-server /usr/local/etc/redis/redis.conf
volumes_from:
- redis_volume
redis_volume:
volumes:
- tmp/:/data

web:
build: .
command: puma -C config/sidekiq_web.rb
ports:
- 80:80
links:
- redis

sidekiq:
build: .
command: sidekiq -r ./app.rb -C config/variables/sidekiq.yml -d -L log/sidekiq_worker.log
links:
- db
- redis
11 changes: 0 additions & 11 deletions fig.yml

This file was deleted.

0 comments on commit 4b2988f

Please sign in to comment.