Add stack.env

This commit is contained in:
TheMaddax 2025-07-03 09:29:44 -05:00
parent 6a6a644498
commit 7483906206
4 changed files with 44 additions and 38 deletions

View file

@ -1,36 +1,34 @@
# Active Context # Active Context
## Current Task ## Current Task
Adding new meeting minutes to the website: COMPLETED: Fixed Portainer repository deployment issue for CACHEBUST mechanism
- Added February 8, 2025 Board Meeting minutes (minutes-02082025.pdf)
- Maintained October 17, 2024 Board Meeting minutes
- Maintained September 14, 2024 and August 6, 2024 Membership Meeting minutes
- Updated Minutes.tsx component to display all entries
## Recent Changes ## Recent Changes
1. Modified Minutes.tsx to include new meeting entry 1. Added 6.jpg to rotating photo carousel:
2. Fixed date sorting issue: - Updated ImageCarousel.tsx to include /photos/6.jpg in images array
- Updated sorting logic to convert date strings to Date objects - Photo now appears in 5-second rotation sequence
- Ensures proper chronological sorting regardless of date format 2. Replaced PDF files with corrected versions (user confirmed pushed to git)
3. File structure: 3. Fixed CACHEBUST deployment issue:
- PDF file location: client/public/minutes/minutes-02082025.pdf - Created stack.env file in repository with CACHEBUST=1736003093
- Component location: client/src/components/Minutes.tsx - Updated docker-compose.yml to reference stack.env file
- Repository deployments in Portainer require stack.env to be in Git repo
- MCP query revealed Portainer creates virtual stack.env for UI deployments but needs physical file for repository deployments
## Next Steps ## Next Steps
1. Deploy changes through Portainer: 1. Commit and push final changes:
- Previous solution (updating VERSION) was already tried and didn't work - git add stack.env docker-compose.yml
- New solution implemented: Added CACHEBUST build argument to force rebuild - git commit -m "Add stack.env for Portainer CACHEBUST deployment"
* Added build arg CACHEBUST to docker-compose.yml - git push
* Modified Dockerfile to use the CACHEBUST argument 2. In Portainer: Click "Pull and redeploy" or use webhook
- Next actions: 3. Verify deployment includes:
a. Commit and push changes to git repository - New 6.jpg in photo carousel
b. In Portainer, go to Stacks > mcdi-website - Corrected PDF files
c. Set CACHEBUST environment variable to current timestamp (e.g., CACHEBUST=1616789123) - All recent code changes
d. Click "Pull and redeploy" or equivalent option
e. Wait for container to rebuild (~2 minutes) ## Solution Summary
f. If still not working, try alternative solutions: - Problem: Portainer repository deployments require stack.env file in Git repo
- Modify Portainer stack settings to use "Build" instead of "Pull" - Solution: Created stack.env with CACHEBUST variable and updated docker-compose.yml
- Check Portainer webhook URL configuration - Future: Update CACHEBUST value in stack.env and push to force rebuilds
## Technical Notes ## Technical Notes
- Website uses React with TypeScript - Website uses React with TypeScript

View file

@ -19,23 +19,29 @@
- 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
- Fixed date sorting issue by converting strings to Date objects for comparison - Fixed date sorting issue by converting strings to Date objects for comparison
2. Deployment (in progress): 2. Added 6.jpg to photo carousel:
- Changes pushed to git repository - Updated ImageCarousel.tsx to include new photo in rotation
- Encountered issues with Portainer not detecting git changes - Photo appears in 5-second rotation sequence with existing photos
- Previous solution (updating VERSION from 1.7 to 1.8 to 1.9) didn't work - User replaced two PDF files with corrected versions
- New solution implemented: Added CACHEBUST build argument to force rebuild
* Added build arg to docker-compose.yml 3. Fixed Portainer deployment issue:
* Modified Dockerfile to use the CACHEBUST argument - Identified repository deployment requires stack.env file in Git repo
- Ready for commit, push, and redeploy in Portainer with CACHEBUST variable - Created stack.env file with CACHEBUST=1736003093
- Updated docker-compose.yml to reference stack.env file
- Used MCP query to understand Portainer stack.env behavior
- Solution enables force rebuilds by updating CACHEBUST value and pushing to Git
## What's Left ## What's Left
1. Immediate: 1. Immediate:
- Commit and push docker-compose.yml and Dockerfile changes - Commit and push stack.env and docker-compose.yml changes
- Deploy changes through Portainer with CACHEBUST environment variable - Deploy changes through Portainer (pull and redeploy)
- Verify all meeting minutes are accessible - Verify deployment includes:
- Test PDF viewing on desktop and mobile * New 6.jpg in photo carousel
* Corrected PDF files
* All recent code changes
2. Future Considerations: 2. Future Considerations:
- Monitor for additional meeting minutes - Monitor for additional meeting minutes
- Consider pagination if minutes list grows large - Consider pagination if minutes list grows large
- Potential archive feature for older minutes - Potential archive feature for older minutes
- Use stack.env CACHEBUST method for future forced deployments

View file

@ -14,6 +14,7 @@ services:
- VERSION=1.11 - VERSION=1.11
env_file: env_file:
- .env - .env
- stack.env
networks: networks:
- caddy_network - caddy_network

1
stack.env Normal file
View file

@ -0,0 +1 @@
CACHEBUST=1736003093