From 8c8bc8c9bfaff36965611b8012a5fb070da6ade5 Mon Sep 17 00:00:00 2001 From: Mac Siri Date: Tue, 16 May 2023 09:48:56 -0400 Subject: [PATCH] [CI] Remove seed container from Uffizzi (#19468) --- uffizzi/Dockerfile | 8 ++++---- uffizzi/docker-compose.uffizzi.yml | 22 +--------------------- uffizzi/entrypoint.sh | 3 ++- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/uffizzi/Dockerfile b/uffizzi/Dockerfile index 56e10061e..7f5d6f91f 100644 --- a/uffizzi/Dockerfile +++ b/uffizzi/Dockerfile @@ -77,7 +77,7 @@ RUN ./scripts/bundle.sh ## Yarn install RUN bash -c yarn install --dev - -ENTRYPOINT ["./scripts/entrypoint.sh"] - -CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-p", "3000"] +# Document that we're going to expose port 3000 +EXPOSE 3000 +# Use Bash as the default command +CMD ["/usr/bin/bash"] diff --git a/uffizzi/docker-compose.uffizzi.yml b/uffizzi/docker-compose.uffizzi.yml index e541a5222..b7d4ea786 100644 --- a/uffizzi/docker-compose.uffizzi.yml +++ b/uffizzi/docker-compose.uffizzi.yml @@ -30,27 +30,7 @@ services: deploy: resources: limits: - memory: 4000M - - seed: - image: "${APP_IMAGE}" - container_name: forem_seed - depends_on: - - rails - - redis - - db - environment: - RAILS_ENV: development - REDIS_SESSIONS_URL: redis://localhost:6379 - REDIS_SIDEKIQ_URL: redis://localhost:6379 - REDIS_URL: redis://localhost:6379 - DATABASE_URL: postgresql://forem:forem@localhost:5432/PracticalDeveloper_development - entrypoint: ["dockerize", "-wait", "tcp://localhost:5432", "-wait", "tcp://localhost:6379", "-wait", "http://localhost:3000", "-timeout", "5400s"] - command: ["./uffizzi/db_seed.sh"] - deploy: - resources: - limits: - memory: 500M + memory: 4000M sidekiq: image: "${APP_IMAGE}" diff --git a/uffizzi/entrypoint.sh b/uffizzi/entrypoint.sh index 997f75599..ca9703022 100755 --- a/uffizzi/entrypoint.sh +++ b/uffizzi/entrypoint.sh @@ -45,6 +45,7 @@ case "$@" in bootstrap) echo "Running rake app_initializer:setup..." bundle exec rake app_initializer:setup + bundle exec rails db:seed ;; *) echo "Running command:" @@ -54,4 +55,4 @@ case "$@" in esac -bundle exec rails server -b 0.0.0.0 -p 3000 \ No newline at end of file +bundle exec rails server -b 0.0.0.0 -p 3000