Don't require database in GHA docker workflow check

This commit is contained in:
Ryan W
2023-09-30 11:39:51 -07:00
parent b6dae0665d
commit 16cec22850
6 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ jobs:
- name: Start - name: Start
run: | run: |
docker run --rm --name=rails-on-docker --env SECRET_KEY_BASE=dummy ${{ env.TEST_TAG }} docker run -d --rm --name=rails-on-docker --env SECRET_KEY_BASE=dummy ${{ env.TEST_TAG }}
- name: Logs - name: Logs
run: | run: |
+1 -1
View File
@@ -29,7 +29,7 @@ RUN gem update --system && gem install bundler
WORKDIR /usr/src/app WORKDIR /usr/src/app
ENTRYPOINT ["./bin/dev-docker-entrypoint"] ENTRYPOINT ["./bin/docker-entrypoint"]
EXPOSE 3000 EXPOSE 3000
-11
View File
@@ -1,11 +0,0 @@
#!/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 "$@"
+9 -6
View File
@@ -1,8 +1,11 @@
#!/bin/bash -e #!/bin/bash
set -e
# If running the rails server then create or migrate existing database # Remove a potentially pre-existing server.pid for Rails.
# if [ "${*}" == "./bin/rails server" ]; then rm -f /usr/src/app/tmp/pids/server.pid
# ./bin/rails db:prepare
# fi
exec "${@}" 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 "$@"
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash -e
# If running the rails server then create or migrate existing database
# if [ "${*}" == "./bin/rails server" ]; then
# ./bin/rails db:prepare
# fi
exec "${@}"
+1 -1
View File
@@ -76,7 +76,7 @@ RUN useradd rails --create-home --shell /bin/bash && \
USER rails:rails USER rails:rails
# Entrypoint prepares the database. # Entrypoint prepares the database.
ENTRYPOINT ["/rails/bin/docker-entrypoint"] ENTRYPOINT ["/rails/bin/docker-entrypoint-production"]
# Start the server by default, this can be overwritten at runtime # Start the server by default, this can be overwritten at runtime
EXPOSE 3000 EXPOSE 3000