Merge pull request #9803 from shanemcd/cluster-migrate-once

Cluster dev env: only run migrations on first node

Reviewed-by: Ryan Petrello <None>
Reviewed-by: Shane McDonald <me@shanemcd.com>
This commit is contained in:
softwarefactory-project-zuul[bot]
2021-04-07 16:59:52 +00:00
committed by GitHub
4 changed files with 62 additions and 1 deletions

View File

@@ -18,6 +18,9 @@ services:
SDB_PORT: {{ awx_sdb_port_start }}
AWX_GROUP_QUEUES: tower
RECEPTORCTL_SOCKET: /var/run/receptor/receptor.sock
{% if loop.index == 1 %}
RUN_MIGRATIONS: 1
{% endif %}
links:
- postgres
- redis_{{ container_postfix }}

View File

@@ -12,7 +12,13 @@ make awx-link
# AWX bootstrapping
make version_file
make migrate
if [[ -n "$RUN_MIGRATIONS" ]]; then
make migrate
else
wait-for-migrations
fi
make init