Fix update bug

This commit is contained in:
TheMaddax 2025-03-25 18:07:55 -05:00
parent 6ebdb0b886
commit 09893fcb5d
5 changed files with 32 additions and 12 deletions

View file

@ -1,6 +1,10 @@
# Build stage # Build stage
FROM node:14 AS build FROM node:14 AS build
# Add a cache busting argument
ARG CACHEBUST=1
RUN echo "Cache bust: $CACHEBUST"
WORKDIR /app WORKDIR /app
# Copy package.json and package-lock.json # Copy package.json and package-lock.json

View file

@ -15,11 +15,19 @@ Adding new meeting minutes to the website:
## Next Steps ## Next Steps
1. Deploy changes through Portainer: 1. Deploy changes through Portainer:
- Log into Portainer dashboard - Previous solution (updating VERSION) was already tried and didn't work
- Find "Containers" in left menu - New solution implemented: Added CACHEBUST build argument to force rebuild
- Locate "mcdi-website" container * Added build arg CACHEBUST to docker-compose.yml
- Click refresh/recreate icon (🔄) * Modified Dockerfile to use the CACHEBUST argument
- Wait for container to rebuild (~2 minutes) - Next actions:
a. Commit and push changes to git repository
b. In Portainer, go to Stacks > mcdi-website
c. Set CACHEBUST environment variable to current timestamp (e.g., CACHEBUST=1616789123)
d. Click "Pull and redeploy" or equivalent option
e. Wait for container to rebuild (~2 minutes)
f. If still not working, try alternative solutions:
- Modify Portainer stack settings to use "Build" instead of "Pull"
- Check Portainer webhook URL configuration
## Technical Notes ## Technical Notes
- Website uses React with TypeScript - Website uses React with TypeScript

View file

@ -18,13 +18,19 @@
- Updated Minutes.tsx component - Updated Minutes.tsx component
- Reordered minutes data from newest (top) to oldest (bottom) in the source array - Reordered minutes data from newest (top) to oldest (bottom) in the source array
2. Deployment: 2. Deployment (in progress):
- Changes ready for deployment via Portainer - Changes pushed to git repository
- Container rebuild pending - Encountered issues with Portainer not detecting git changes
- Previous solution (updating VERSION from 1.7 to 1.8 to 1.9) didn't work
- New solution implemented: Added CACHEBUST build argument to force rebuild
* Added build arg to docker-compose.yml
* Modified Dockerfile to use the CACHEBUST argument
- Ready for commit, push, and redeploy in Portainer with CACHEBUST variable
## What's Left ## What's Left
1. Immediate: 1. Immediate:
- Deploy changes through Portainer - Commit and push docker-compose.yml and Dockerfile changes
- Deploy changes through Portainer with CACHEBUST environment variable
- Verify all meeting minutes are accessible - Verify all meeting minutes are accessible
- Test PDF viewing on desktop and mobile - Test PDF viewing on desktop and mobile

View file

@ -4,12 +4,14 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
args:
CACHEBUST: ${CACHEBUST:-1}
pull_policy: build pull_policy: build
ports: ports:
- "801:801" - "801:801"
environment: environment:
- NODE_ENV=production - NODE_ENV=production
- VERSION=1.9 - VERSION=1.10
env_file: env_file:
- .env - .env
networks: networks: