Files
pulse/docker-compose.yml
T
courtmanr@gmail.com d883d85b7b fix: implement persistent Docker volume configuration to prevent data loss
Previously, configuration created via the web UI was lost when containers were
recreated or updated, requiring users to reconfigure each time. This was due to
the .env file being stored inside the container filesystem.

Changes:
- Add persistent volume mount for configuration directory in docker-compose.yml
- Update ConfigApi to auto-detect Docker vs development environment
- Configure dotenv loading to use persistent config path when available
- Update file watcher to monitor correct .env file location
- Remove conflicting host .env file mount
- Update README with new volume configuration instructions

Configuration now persists across container updates, eliminating the need for
users to reconfigure after updates.

Fixes #94

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-31 10:30:51 +01:00

34 lines
1.1 KiB
YAML

services:
pulse-server:
# Build context commented out - using pre-built image from Docker Hub
build:
context: .
dockerfile: Dockerfile
# image: rcourtman/pulse:latest # Use the pre-built image from Docker Hub
container_name: pulse
restart: unless-stopped
ports:
# Map container port 7655 to host port 7655
# You can change the host port (left side) if 7655 is already in use on your host
- "7655:7655"
# env_file:
# NOTE: .env file is now managed by the web UI and stored in persistent volume
# No need to load from host .env file
# - .env
volumes:
# Persist configuration data to avoid losing settings on container recreation
# Mount a persistent volume for configuration files
- pulse_config:/usr/src/app/config
# Optional: Define networks if needed, otherwise uses default bridge network
# networks:
# - pulse_network
# Define persistent volumes for configuration and data
volumes:
pulse_config:
driver: local
# Optional: Define a network
# networks:
# pulse_network:
# driver: bridge