Skip to content

Commit c0db4e5

Browse files
committed
Allow orchestrator tasks in startup without db
1 parent d864570 commit c0db4e5

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.gitlab-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ boot:docker:
136136
--name sagittarius
137137
--network sagittarius_default
138138
--network-alias sagittarius
139+
-e DOCKER_HOST=$DOCKER_HOST
140+
-e DOCKER_TLS_CERTDIR=$DOCKER_TLS_CERTDIR
139141
-e RAILS_ENV=production
142+
-v $DOCKER_TLS_CERTDIR:$DOCKER_TLS_CERTDIR
140143
ghcr.io/code0-tech/sagittarius/ci-builds:${CI_COMMIT_SHA} &
141144
- >
142145
docker run

bin/docker-entrypoint

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
55
bundle exec rake orchestrator:start[postgresql] \
66
orchestrator:start[redis] \
77
orchestrator:await_healthy[postgresql] \
8-
orchestrator:await_healthy[redis]
8+
orchestrator:await_healthy[redis] \
9+
orchestrator:connect_self
910

1011
# create connection environment variables
1112
eval $(bundle exec orchestrator:create_connection_environment[postgresql,redis])

config/initializers/application_settings.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Rails.application.config.to_prepare do
44
next unless Rails.env.production?
5-
next if ARGV.grep(/db:/).any?
5+
next if ARGV.grep(/db:|orchestrator:/).any?
66

77
ApplicationSetting.assert_settings_present!
88
end

0 commit comments

Comments
 (0)