mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
fix(redash/upgrade): variables used by docker need to be exported
This commit is contained in:
@@ -62,24 +62,25 @@ REDASH_IMAGE="$(\
|
|||||||
| xargs -oI '%%' aws ecs describe-tasks --cluster 'someCluster' --task '%%' --output 'text' \
|
| xargs -oI '%%' aws ecs describe-tasks --cluster 'someCluster' --task '%%' --output 'text' \
|
||||||
--query 'tasks[].containers[?name==`server`].image' \
|
--query 'tasks[].containers[?name==`server`].image' \
|
||||||
)"
|
)"
|
||||||
REDASH_DATABASE_URL="$(\
|
export \
|
||||||
aws rds describe-db-instances --db-instance-identifier 'redash' --output 'text' \
|
REDASH_DATABASE_URL="$(\
|
||||||
--query '
|
aws rds describe-db-instances --db-instance-identifier 'redash' --output 'text' \
|
||||||
DBInstances[0]
|
--query '
|
||||||
| join(``, [
|
DBInstances[0]
|
||||||
`postgresql://`,MasterUsername,`:`,`PASSWORD`,`@`,Endpoint.Address,`:`,to_string(Endpoint.Port),`/`,
|
| join(``, [
|
||||||
DBName || `postgres`
|
`postgresql://`,MasterUsername,`:`,`PASSWORD`,`@`,Endpoint.Address,`:`,to_string(Endpoint.Port),`/`,
|
||||||
])
|
DBName || `postgres`
|
||||||
' \
|
])
|
||||||
)"
|
' \
|
||||||
REDASH_REDIS_URL="$(\
|
)" \
|
||||||
aws elasticache describe-replication-groups --replication-group-id 'redash' --output 'text' \
|
REDASH_REDIS_URL="$(\
|
||||||
--query '
|
aws elasticache describe-replication-groups --replication-group-id 'redash' --output 'text' \
|
||||||
ReplicationGroups[].NodeGroups[].PrimaryEndpoint[]
|
--query '
|
||||||
.join(``,[`redis://`,Address,`:`,to_string(Port),`/0`])
|
ReplicationGroups[].NodeGroups[].PrimaryEndpoint[]
|
||||||
' \
|
.join(``,[`redis://`,Address,`:`,to_string(Port)])
|
||||||
)"
|
' \
|
||||||
REDASH_COOKIE_SECRET="aa…Wd"
|
)" \
|
||||||
|
REDASH_COOKIE_SECRET="aa…Wd"
|
||||||
docker run --rm --name 'redash-db-migrations' --platform 'linux/amd64' --dns '172.31.0.2' \
|
docker run --rm --name 'redash-db-migrations' --platform 'linux/amd64' --dns '172.31.0.2' \
|
||||||
--env 'REDASH_COOKIE_SECRET' --env 'REDASH_DATABASE_URL' --env 'REDASH_REDIS_URL' \
|
--env 'REDASH_COOKIE_SECRET' --env 'REDASH_DATABASE_URL' --env 'REDASH_REDIS_URL' \
|
||||||
"$REDASH_IMAGE" manage db upgrade
|
"$REDASH_IMAGE" manage db upgrade
|
||||||
|
|||||||
Reference in New Issue
Block a user