Switch to pre-built Docker Hub image for production
- Push app image to jpscott84/drinktracker on Docker Hub - docker-compose.prod.yml uses image instead of build - install.sh pulls image instead of building from source - Much faster deploys (no npm ci/build on target server) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,9 +63,7 @@ services:
|
|||||||
restart: "no"
|
restart: "no"
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build:
|
image: jpscott84/drinktracker:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
|
|||||||
@@ -293,13 +293,13 @@ ENVEOF
|
|||||||
success "$ENV_FILE created (permissions: 600)"
|
success "$ENV_FILE created (permissions: 600)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ─── Step 5: Build & Start ──────────────────────────────────
|
# ─── Step 5: Pull & Start ────────────────────────────────────
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
info "Building Docker images (this may take a few minutes on first run)..."
|
info "Pulling Docker images..."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
dc build --no-cache
|
dc pull
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
info "Starting services..."
|
info "Starting services..."
|
||||||
@@ -398,7 +398,7 @@ echo -e " ${BOLD}Useful commands:${NC}"
|
|||||||
echo " View logs: $DC_CMD logs -f"
|
echo " View logs: $DC_CMD logs -f"
|
||||||
echo " Stop: $DC_CMD down"
|
echo " Stop: $DC_CMD down"
|
||||||
echo " Restart: $DC_CMD restart"
|
echo " Restart: $DC_CMD restart"
|
||||||
echo " Rebuild: $DC_CMD up -d --build"
|
echo " Update: $DC_CMD pull && $DC_CMD up -d"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e " ${BOLD}${YELLOW}Next steps:${NC}"
|
echo -e " ${BOLD}${YELLOW}Next steps:${NC}"
|
||||||
echo " 1. Open ${APP_URL_CHECK} and create your account"
|
echo " 1. Open ${APP_URL_CHECK} and create your account"
|
||||||
|
|||||||
Reference in New Issue
Block a user