Cluster dev env: only run migrations on first node

This commit is contained in:
Shane McDonald
2021-04-03 13:23:29 -04:00
parent 91c2f80e22
commit 7b25216ee9
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