forked from blackcandy-org/blackcandy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix config issue in production environment
- Loading branch information
Showing
4 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
FROM ruby:3.1-alpine | ||
FROM ruby:3.1.2-alpine | ||
|
||
ENV LANG C.UTF-8 | ||
|
||
ENV RAILS_ENV production | ||
|
||
ENV NODE_ENV production | ||
ENV RAILS_SERVE_STATIC_FILES true | ||
|
||
LABEL maintainer="[email protected]/aidewoode" | ||
|
||
|
@@ -16,15 +15,15 @@ RUN apk add --no-cache \ | |
yarn \ | ||
imagemagick \ | ||
ffmpeg \ | ||
nginx \ | ||
gcompat | ||
|
||
WORKDIR /app | ||
|
||
ADD . /app | ||
|
||
RUN apk add --no-cache --virtual .build-deps build-base \ | ||
&& bundle install --without development test \ | ||
&& bundle config --local without 'development test' \ | ||
&& bundle install \ | ||
&& rm -rf /usr/local/bundle/cache/*.gem \ | ||
&& apk del --no-network .build-deps | ||
|
||
|
@@ -33,8 +32,6 @@ RUN bundle exec rails assets:precompile SECRET_KEY_BASE=fake_secure_for_compile | |
&& yarn cache clean \ | ||
&& rm -rf node_modules tmp/cache/* /tmp/* | ||
|
||
RUN cp config/nginx/nginx.conf /etc/nginx/nginx.conf | ||
|
||
ENTRYPOINT ["docker/entrypoint.sh"] | ||
|
||
EXPOSE 3000 | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Prepare Database | ||
rails db:prepare | ||
# Prepare database. Beacuse when the database adapter is sqlite, the task 'db:prepare' won't run 'db:seed'. | ||
# So add 'db:seed' task explicitly to avoit it. See https://github.com/rails/rails/issues/36383 | ||
rails db:prepare && rails db:seed | ||
|
||
bundle exec puma -C config/puma.rb |