Skip to content

Instantly share code, notes, and snippets.

@sauy7
Last active June 13, 2018 07:00
Show Gist options
  • Save sauy7/d5c732faad876fde8b2d16672b29a992 to your computer and use it in GitHub Desktop.
Save sauy7/d5c732faad876fde8b2d16672b29a992 to your computer and use it in GitHub Desktop.
​# Git​
.git
.gitignore
​# Logs​
log/*
# Temp files​
tmp/*
# Webpack-related
node_modules
NODE_ENV=development
RAILS_ENV=development
WEBPACKER_DEV_SERVER_HOST=webpack
version: "3"
services:
webpack:
build: .
env_file:
- '.env.docker'
command: './bin/webpack-dev-server'
volumes:
- '.:/usr/src/app'
ports:
- '3035:3035'
web:
build: .
ports:
- '3000:3000'
command: 'puma -C config/puma.rb'
volumes:
- '.:/usr/src/app'
env_file:
- '.env.docker'
FROM ruby:2.5
RUN apt-get update -qq && apt-get install -yqq build-essential apt-transport-https apt-utils
# for nokogiri
RUN apt-get install -yqq libxml2-dev libxslt1-dev
# node
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
# yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update -qq && apt-get install -y yarn
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# gems
COPY Gemfile* /usr/src/app/
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
WORKDIR /usr/src/app
RUN bundle install
RUN yarn install
RUN yarn check --integrity
COPY . /usr/src/app/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment