-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move production to the default and devlopment to alternate
- Loading branch information
Showing
9 changed files
with
128 additions
and
130 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
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,11 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
#!/bin/bash -e | ||
|
||
# Remove a potentially pre-existing server.pid for Rails. | ||
rm -f /usr/src/app/tmp/pids/server.pid | ||
echo "entrypoint" | ||
echo "${*}" | ||
|
||
echo "bundle install..." | ||
bundle check || bundle install --jobs 4 | ||
# NOTE: Enable this as you need to get migrations working in your deployed | ||
# (i.e. Production) environments. Match the condition check to what you have in | ||
# the Dockerfile CMD. I use puma in the production.Dockerfile as that's the | ||
# recommended option by the Puma team (https://github.com/puma/puma#rails), but | ||
# the default Rails Dockerfile uses `./bin/rails server` | ||
# | ||
# If running the rails server then create or migrate existing database | ||
# if [ "${*}" == "./bin/rails server" ]; then | ||
# ./bin/rails db:prepare | ||
# fi | ||
|
||
# Then exec the container's main process (what's set as CMD in the Dockerfile). | ||
exec "$@" | ||
exec "${@}" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Remove a potentially pre-existing server.pid for Rails. | ||
rm -f /usr/src/app/tmp/pids/server.pid | ||
|
||
echo "bundle install..." | ||
bundle check || bundle install --jobs 4 | ||
|
||
# Then exec the container's main process (what's set as CMD in the Dockerfile). | ||
exec "$@" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile | ||
ARG RUBY_VERSION=3.2.2 | ||
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base | ||
|
||
# OS Level Dependencies | ||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
--mount=type=tmpfs,target=/var/log \ | ||
rm -f /etc/apt/apt.conf.d/docker-clean; \ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache; \ | ||
apt-get update -qq \ | ||
&& apt-get install -yq --no-install-recommends \ | ||
build-essential \ | ||
gnupg2 \ | ||
less \ | ||
git \ | ||
libpq-dev \ | ||
postgresql-client \ | ||
libvips \ | ||
curl | ||
|
||
ENV LANG=C.UTF-8 \ | ||
BUNDLE_JOBS=4 \ | ||
BUNDLE_RETRY=3 | ||
|
||
RUN gem update --system && gem install bundler | ||
|
||
WORKDIR /usr/src/app | ||
|
||
ENTRYPOINT ["./bin/docker-entrypoint-development"] | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"] |
This file was deleted.
Oops, something went wrong.