mirror of
https://github.com/marcogll/ap_pos.git
synced 2026-01-13 05:15:14 +00:00
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:
@@ -73,8 +73,12 @@ El sistema está diseñado para ser desplegado fácilmente utilizando Docker y D
|
||||
# Edita el archivo .env con una clave secreta segura
|
||||
```
|
||||
|
||||
3. **Construye y levanta** el contenedor:
|
||||
3. **Levanta** el contenedor:
|
||||
```bash
|
||||
# Usar imagen desde Docker Hub (recomendado para producción)
|
||||
docker-compose up -d
|
||||
|
||||
# O construir localmente (para desarrollo)
|
||||
docker-compose up -d --build
|
||||
```
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user