fix(deploy): correct env vars, docker compose project names, and workflow outputs
- Standardize environment variable from IS_PROD to PROD across all scripts - Add missing -p flag to docker compose commands for consistent project naming - Fix GitHub Actions workflow to use environment vars instead of job outputs - Consolidate metadata setup and fix artifact naming in build/deploy jobs - Correct service paths in docker-compose_core.yml
This commit is contained in:
parent
f20c4f9474
commit
291231c886
9 changed files with 104 additions and 70 deletions
|
|
@ -71,17 +71,17 @@ case "$COMMAND" in
|
|||
|
||||
# Read environment from target version
|
||||
if [ -f "${TARGET_PATH}/.deployment_env" ]; then
|
||||
IS_PROD=$(cat "${TARGET_PATH}/.deployment_env")
|
||||
PROD=$(cat "${TARGET_PATH}/.deployment_env")
|
||||
else
|
||||
echo "Warning: Could not determine environment, assuming staging"
|
||||
IS_PROD="false"
|
||||
PROD="false"
|
||||
fi
|
||||
|
||||
# Stop current containers
|
||||
if [ -L "$CURRENT_LINK_PATH" ] && [ -d "$CURRENT_LINK_PATH" ]; then
|
||||
cd "$CURRENT_LINK_PATH"
|
||||
docker compose -f docker-compose_web.yml down || true
|
||||
[ "$IS_PROD" = "false" ] && docker compose -f docker-compose_staging.yml down || true
|
||||
[ "$PROD" = "false" ] && docker compose -f docker-compose_staging.yml down || true
|
||||
docker compose -f docker-compose_core.yml down || true
|
||||
fi
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ case "$COMMAND" in
|
|||
# Start containers
|
||||
cd "$CURRENT_LINK_PATH"
|
||||
docker compose -f docker-compose_core.yml up -d --no-build
|
||||
if [ "$IS_PROD" = "true" ]; then
|
||||
if [ "$PROD" = "true" ]; then
|
||||
docker compose -f docker-compose_web.yml up -d --no-build
|
||||
else
|
||||
docker compose -f docker-compose_web.yml -f docker-compose_staging.yml up -d --no-build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue