- Add multi-platform Docker build support with docker-bake.hcl - Update Dockerfile with improved production build configurations - Enhance Makefile with streamlined deployment targets for local, dev, and prod - Improve buildx-helper.sh script for better cross-platform builds - Fix production build security validations for JWT_SECRET and SESSION_SECRET - Add comprehensive deployment documentation and environment setup guides These changes enable efficient multi-platform image creation and provide clear deployment workflows for different environments.
🐳 Docker Configuration
This directory contains all Docker and containerization-related files for RxMinder.
Files
Dockerfile- Multi-stage Docker build configuration with buildx supportdocker-compose.yaml- Service orchestration with multi-platform supportdocker-bake.hcl- Advanced buildx configuration for multi-platform buildsnginx.conf- Production web server configuration.dockerignore- Files and directories to exclude from Docker build context
Docker Buildx Support
This project now supports Docker Buildx for multi-platform builds (AMD64 and ARM64).
Quick Start with Buildx
# Setup buildx builder (run once)
../scripts/buildx-helper.sh setup
# Build for local platform only (faster for development)
../scripts/buildx-helper.sh build-local
# Build for multiple platforms
../scripts/buildx-helper.sh build-multi
# Build and push to registry
../scripts/buildx-helper.sh push docker.io/username latest
# Build using Docker Bake (advanced)
../scripts/buildx-helper.sh bake
Manual Buildx Commands
# Create and use buildx builder
docker buildx create --name rxminder-builder --driver docker-container --bootstrap --use
# Build for multiple platforms
docker buildx build --platform linux/amd64,linux/arm64 -t rxminder:latest --load .
# Build with bake file
docker buildx bake -f docker-bake.hcl
Traditional Usage
From the project root directory:
# Build and start services
docker compose -f docker/docker-compose.yaml up -d
# View logs
docker compose -f docker/docker-compose.yaml logs
# Stop services
docker compose -f docker/docker-compose.yaml down
Build Process
The Dockerfile uses a multi-stage build:
- Builder stage: Installs dependencies and builds the React app
- Production stage: Serves the built app with nginx
Services
- frontend: React application served by nginx
- couchdb: Database for medication and user data
Both services include health checks and proper security configurations.