fix: Improve Docker data persistence for Coolify deployments

- Update docker-compose.yml to use latest image tag
- Add DB_PATH environment variable for explicit database location
- Configure bind mount for better data persistence in Coolify
- Add VOLUME directive in Dockerfile for data directory
- Ensure database survives container updates and restarts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Marco Gallegos
2025-08-29 08:20:41 -06:00
parent bbcd85eff7
commit 1e92398891
2 changed files with 11 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
services:
ap-pos:
image: marcogll/ap_pos:1.3.1
image: marcogll/ap_pos:latest
container_name: ap-pos
restart: unless-stopped
ports:
@@ -8,6 +8,7 @@ services:
environment:
NODE_ENV: production
SESSION_SECRET: ${SESSION_SECRET:-your-very-secret-key-change-it-in-production}
DB_PATH: /app/data/ap-pos.db
volumes:
- ap_pos_data:/app/data
healthcheck:
@@ -20,3 +21,7 @@ services:
volumes:
ap_pos_data:
driver: local
driver_opts:
type: none
o: bind
device: ./data