Skip to content

Commit 8be66a8

Browse files
committed
Disable orchestrator in boot:docker job
1 parent c0db4e5 commit 8be66a8

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

.gitlab-ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,18 @@ boot:docker:
130130
DOCKER_TLS_CERTDIR: /certs
131131
DOCKER_HOST: tcp://docker:2376
132132
script:
133-
- docker network create sagittarius_default
133+
- docker compose -f docker-compose.dev.yml up -d
134134
- >
135135
docker run
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
139+
-e SAGITTARIUS_DATABASE_HOST=postgresql
140+
-e SAGITTARIUS_DATABASE_PORT=5432
141+
-e SAGITTARIUS_REDIS_HOST=redis
142+
-e SAGITTARIUS_REDIS_PORT=6379
143+
-e SAGITTARIUS_DISABLE_ORCHESTRATOR=true
141144
-e RAILS_ENV=production
142-
-v $DOCKER_TLS_CERTDIR:$DOCKER_TLS_CERTDIR
143145
ghcr.io/code0-tech/sagittarius/ci-builds:${CI_COMMIT_SHA} &
144146
- >
145147
docker run

bin/docker-entrypoint

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#!/bin/bash -e
22

33
if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
4-
# orchestrate dependencies
5-
bundle exec rake orchestrator:start[postgresql] \
6-
orchestrator:start[redis] \
7-
orchestrator:await_healthy[postgresql] \
8-
orchestrator:await_healthy[redis] \
9-
orchestrator:connect_self
4+
if [ "${SAGITTARIUS_DISABLE_ORCHESTRATOR}" != "true" ]; then
5+
# orchestrate dependencies
6+
bundle exec rake orchestrator:start[postgresql] \
7+
orchestrator:start[redis] \
8+
orchestrator:await_healthy[postgresql] \
9+
orchestrator:await_healthy[redis] \
10+
orchestrator:connect_self
1011

11-
# create connection environment variables
12-
eval $(bundle exec orchestrator:create_connection_environment[postgresql,redis])
12+
# create connection environment variables
13+
eval $(bundle exec rake orchestrator:create_connection_environment[postgresql,redis])
14+
fi
1315

1416
# prepare database
1517
bundle exec rake db:prepare

0 commit comments

Comments
 (0)