Skip to content

Commit d42cab0

Browse files
committed
fix remote install
1 parent 4d62534 commit d42cab0

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,6 @@ services:
393393
- FLAGD_HOST
394394
- FLAGD_PORT
395395
- GOMEMLIMIT=16MiB
396-
volumes:
397-
- ./src/product-catalog/products:/usr/src/app/products
398396
depends_on:
399397
flagd:
400398
condition: service_started

install.sh

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,38 @@ if ! curl -fsSL "${ENV_FILE_URL}" -o .env; then
6161
fi
6262
echo -e "${GREEN}${NC} Downloaded .env file"
6363

64-
# Pull images
65-
echo ""
66-
echo -e "${YELLOW}${NC} Pulling Docker images (this may take a few minutes)..."
67-
${DOCKER_COMPOSE} -p "${PROJECT_NAME}" pull
64+
# Download required data files
65+
echo -e "${YELLOW}${NC} Downloading required data files..."
66+
67+
# Create directories
68+
mkdir -p src/flagd src/postgres
69+
70+
# Download flagd configuration
71+
if ! curl -fsSL "https://raw.githubusercontent.com/${GITHUB_REPO}/${BRANCH}/src/flagd/demo.flagd.json" -o src/flagd/demo.flagd.json; then
72+
echo -e "${RED}Error: Failed to download flagd configuration${NC}"
73+
exit 1
74+
fi
75+
echo -e "${GREEN}${NC} Downloaded flagd configuration"
6876

69-
# Start containers
77+
# Download postgres init script
78+
if ! curl -fsSL "https://raw.githubusercontent.com/${GITHUB_REPO}/${BRANCH}/src/postgres/init.sql" -o src/postgres/init.sql; then
79+
echo -e "${RED}Error: Failed to download postgres init script${NC}"
80+
exit 1
81+
fi
82+
echo -e "${GREEN}${NC} Downloaded postgres init script"
83+
84+
# Start containers with pull
7085
echo ""
71-
echo -e "${YELLOW}${NC} Starting containers..."
72-
${DOCKER_COMPOSE} -p "${PROJECT_NAME}" up -d
86+
echo -e "${YELLOW}${NC} Pulling images and starting containers (this may take a few minutes)..."
87+
88+
if [[ "${DOCKER_COMPOSE}" == "docker compose" ]]; then
89+
# Docker Compose v2 - use --pull always flag
90+
${DOCKER_COMPOSE} -p "${PROJECT_NAME}" up -d --pull always
91+
else
92+
# Docker Compose v1 - pull first, then up
93+
${DOCKER_COMPOSE} -p "${PROJECT_NAME}" pull
94+
${DOCKER_COMPOSE} -p "${PROJECT_NAME}" up -d
95+
fi
7396

7497
# Check if containers are running
7598
echo ""

0 commit comments

Comments
 (0)