fix: Update Docker configuration for persistent data storage

- Update docker-compose.yml to use latest image marcogll/ap-pos:latest
- Change from bind mount to named volume for better data persistence
- Add proper volumes section to ensure database survives container restarts
- Update README with corrected deployment instructions

This fixes the issue where imported JSON products were lost on container restart.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Marco Gallegos
2025-09-08 19:05:19 -06:00
parent 6e97309323
commit a12ac988eb
2 changed files with 12 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
version: '3.8'
services:
ap-pos:
image: marcogll/ap_pos:1.4.1
image: marcogll/ap-pos:latest
container_name: ap-pos
restart: unless-stopped
ports:
@@ -10,7 +12,7 @@ services:
SESSION_SECRET: ${SESSION_SECRET:-your-very-secret-key-change-it-in-production}
DB_PATH: /app/data/ap-pos.db
volumes:
- ./data:/app/data
- ap_pos_data:/app/data
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3111/login.html"]
interval: 30s
@@ -18,4 +20,6 @@ services:
retries: 3
start_period: 40s
# volumes section no longer needed - using direct bind mount
volumes:
ap_pos_data:
driver: local