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
FROM node:14 AS build
# Add a cache busting argument
ARG CACHEBUST=1
RUN echo "Cache bust: $CACHEBUST"
WORKDIR /app
# Copy package.json and package-lock.json

View file

@ -15,11 +15,19 @@ Adding new meeting minutes to the website:
## Next Steps
1. Deploy changes through Portainer:
- Log into Portainer dashboard
- Find "Containers" in left menu
- Locate "mcdi-website" container
- Click refresh/recreate icon (🔄)
- Wait for container to rebuild (~2 minutes)
- Previous solution (updating VERSION) was already tried and didn't work
- New solution implemented: Added CACHEBUST build argument to force rebuild
* Added build arg CACHEBUST to docker-compose.yml
* Modified Dockerfile to use the CACHEBUST argument
- 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
- Website uses React with TypeScript

View file

@ -18,13 +18,19 @@
- Updated Minutes.tsx component
- Reordered minutes data from newest (top) to oldest (bottom) in the source array
2. Deployment:
- Changes ready for deployment via Portainer
- Container rebuild pending
2. Deployment (in progress):
- Changes pushed to git repository
- 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
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
- Test PDF viewing on desktop and mobile

View file

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