Skip to content

Commit b1d7a2b

Browse files
authored
[ruby/sinatra] Pass environment as APP_ENV (#10178)
Instead of passing it as an option to the server. This also fixes the iodine versions, as these were using development instead of production.
1 parent 7953522 commit b1d7a2b

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-iodine-mri.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ WORKDIR /sinatra-sequel
1313
ENV BUNDLE_WITH=postgresql:iodine
1414
RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile
1515

16+
ENV APP_ENV=production
1617
ENV DBTYPE=postgresql
1718

1819
EXPOSE 8080

frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ ENV BUNDLE_WITH=postgresql:puma
1414
RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile
1515

1616
ENV WEB_CONCURRENCY=auto
17+
ENV APP_ENV=production
1718
ENV DBTYPE=postgresql
1819

1920
EXPOSE 8080
2021

21-
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production
22+
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080

frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ ENV BUNDLE_WITH=mysql:puma
1414
RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile
1515

1616
ENV WEB_CONCURRENCY=auto
17+
ENV APP_ENV=production
1718
ENV DBTYPE=mysql
1819

1920
EXPOSE 8080
2021

21-
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production
22+
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080

frameworks/Ruby/sinatra/sinatra-postgres-iodine-mri.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ WORKDIR /sinatra
1313
ENV BUNDLE_WITH=postgresql:iodine
1414
RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile
1515

16+
ENV APP_ENV=production
1617
ENV DBTYPE=postgresql
1718

1819
EXPOSE 8080

frameworks/Ruby/sinatra/sinatra-postgres.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ ENV BUNDLE_WITH=postgresql:puma
1414
RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile
1515

1616
ENV WEB_CONCURRENCY=auto
17+
ENV APP_ENV=production
1718
ENV DBTYPE=postgresql
1819

1920
EXPOSE 8080
2021

21-
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production
22+
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080

frameworks/Ruby/sinatra/sinatra.dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ WORKDIR /sinatra
1313
ENV BUNDLE_WITH=mysql:puma
1414
RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile
1515

16+
ENV APP_ENV=production
1617
ENV DBTYPE=mysql
1718

1819
ENV WEB_CONCURRENCY=auto
1920
EXPOSE 8080
2021

21-
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production
22+
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080

0 commit comments

Comments
 (0)