Dokku deploy setup (#1)

* fix: remove config.key from Dockerfile

* refactor: remove redis

* chore: update README

* feat: precompile assets on build Dockerfile
This commit is contained in:
Juan Rodriguez
2023-03-26 19:00:09 +02:00
committed by GitHub
parent 38ce72618a
commit 63acab3cf7
9 changed files with 50 additions and 45 deletions
+8 -8
View File
@@ -1,13 +1,15 @@
FROM ruby:2.6.3-alpine
ARG RAILS_MASTER_KEY=''
ENV RAILS_MASTER_KEY ${RAILS_MASTER_KEY}
ENV RAILS_ENV production
ENV APP_PATH /usr/src/app
ENV BUNDLE_VERSION 2.1.4
ENV RAILS_LOG_TO_STDOUT true
ENV RAILS_ENV production
WORKDIR $APP_PATH
EXPOSE $RAILS_PORT
EXPOSE 3000
ENV ALPINE_MIRROR "http://dl-cdn.alpinelinux.org/alpine"
RUN echo "${ALPINE_MIRROR}/v3.11/main/" >> /etc/apk/repositories
@@ -30,17 +32,15 @@ RUN gem install bundler --version "$BUNDLE_VERSION"
COPY ./Gemfile .
COPY ./Gemfile.lock .
RUN bundle install --jobs 20 --retry 5
RUN bundle install --binstubs
COPY ./package.json .
COPY ./yarn.lock .
RUN yarn
RUN yarn --production
COPY . .
RUN chmod 600 config/master.key
RUN bundle exec rails assets:precompile
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]