diff --git a/README.md b/README.md index 284f774..2d6bd13 100644 --- a/README.md +++ b/README.md @@ -56,16 +56,28 @@ This will create: ### Coolify Deployment -To deploy on Coolify: +To deploy on Coolify with persistent storage: 1. In your Coolify dashboard, create a new service 2. Select "Docker Compose" as the deployment type 3. Connect to your Git repository or upload the files directly -4. Ensure the volume is configured correctly for data persistence +4. **Important**: The docker-compose.yml file has been configured with: + - A named volume: `coolify-weight-tracker-data` + - A Coolify-specific label: `coolify.volume.weight-tracker-data=/data` 5. Deploy the application +6. Verify that the persistent volume appears in your Coolify resources The application will be available at the URL provided by Coolify. All weight and meal data will be stored in the persistent volume, ensuring your data remains intact across container restarts or updates. +#### Verifying Data Persistence + +After deployment: +1. Add some weight or meal entries in the application +2. Restart the container from the Coolify dashboard +3. Verify your data is still available after the restart + +Even with persistent storage configured, it's recommended to occasionally use the "Export Data" feature in the Settings tab as an additional backup. + ## Roadmap ### Phase 1 (Current) diff --git a/docker-compose.yml b/docker-compose.yml index 5d78bc8..43e4d0e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,8 @@ services: - weight-tracker-data:/data networks: - weight-tracker-network + labels: + - "coolify.volume.weight-tracker-data=/data" networks: weight-tracker-network: @@ -21,3 +23,4 @@ networks: volumes: weight-tracker-data: driver: local + name: coolify-weight-tracker-data # Named volume for Coolify to identify