Last active
March 2, 2016 20:10
-
-
Save denoww/32146f3f1afac2c00bd4 to your computer and use it in GitHub Desktop.
Docker and docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.0.0-onbuild | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev redis-server imagemagick && apt-get install -y postgresql-client | |
# libjpeg8 para funcionar wkhtmltopdf | |
RUN wget http://ftp.us.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8d1-2_amd64.deb | |
RUN dpkg -i libjpeg8_8d1-2_amd64.deb | |
ENV erp /erp | |
RUN mkdir $erp | |
WORKDIR $erp | |
ADD Gemfile $erp/Gemfile | |
ADD Gemfile.lock $erp/Gemfile.lock | |
# ENV BUNDLE_PATH /bundle | |
# ADD Gemfile* $erp/ | |
# # --- Add this to your Dockerfile --- | |
# ENV BUNDLE_GEMFILE=$erp/Gemfile \ | |
# BUNDLE_JOBS=2 \ | |
# BUNDLE_PATH=/bundle | |
ADD . $erp | |
web: | |
build: . | |
command: bundle exec rails s -p 3000 -b '0.0.0.0' | |
volumes: | |
- .:/erp | |
# volumes_from: | |
# - bundle | |
ports: | |
- "3000:3000" | |
links: | |
- db | |
- redis | |
- mongo | |
- channelio | |
worker: | |
build: . | |
command: bundle exec sidekiq -e development | |
volumes: | |
- .:/erp | |
# volumes_from: | |
# - bundle | |
environment: | |
RAILS_ENV: development | |
links: | |
- db | |
- redis | |
- mongo | |
- channelio | |
db: | |
image: postgres | |
mongo: | |
image: mongo | |
ports: | |
- "27017:27017" | |
redis: | |
image: redis | |
volumes: | |
- ./redis.conf:/usr/local/etc/redis/redis.conf | |
ports: | |
- "6379" | |
channelio: | |
image: denoww/channel_io | |
ports: | |
- "5200:5200" | |
bundle: | |
image: seucondominio_web | |
volumes: | |
- /bundle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment