Skip to content

Commit

Permalink
allow app to be run by 'app' user
Browse files Browse the repository at this point in the history
  • Loading branch information
ph448 committed Apr 13, 2021
1 parent 22d1e2e commit 61e4c8b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \
rm -f /etc/service/nginx/down /etc/nginx/sites-enabled/default && \
mkdir -p $RAILS_ROOT

COPY --chown=app:app . $RAILS_ROOT
COPY Gemfile $RAILS_ROOT
RUN bundle install --jobs 20 --retry 5


# NGINX

COPY entrypoint.sh /usr/bin/
ADD nginx/webapp.conf /etc/nginx/sites-enabled/webapp.conf

USER app
COPY --chown=app:app . $RAILS_ROOT
COPY Gemfile $RAILS_ROOT
RUN bundle install

EXPOSE 3000

# Start the main process.
ENTRYPOINT ["entrypoint.sh"]
#CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-e", "production"]
CMD ["bundle", "exec", "passenger", "start"]
Expand Down

0 comments on commit 61e4c8b

Please sign in to comment.