Setup Rails project and dockerize

This commit is contained in:
riggraz
2019-08-18 14:51:37 +02:00
commit 467d5a9a0f
94 changed files with 8941 additions and 0 deletions

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM ruby:2.6.3
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
RUN npm install -g yarn
RUN mkdir /app
WORKDIR /app
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
RUN bundle install
RUN yarn install --check-files
COPY . /app
# Add a script to be executed every time the container starts.
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
# Start the main process.
CMD ["rails", "server", "-b", "0.0.0.0"]