"""
utility functions for garmindb-mtb-dashboard
"""

import sys

def is_running_in_docker():
    """
    Checks if the current process is running inside a Docker container.
    """
    try:
        with open('/proc/1/cgroup', 'r') as f:
            cgroup = f.read()
            return 'docker' in cgroup
    except FileNotFoundError:
        return False

    # if is_running_in_docker():
    #     sys.stderr.write("Running in a Docker container\n")
    #     csv_file = '/root/HealthData/garmin_bike.csv'
    # else:
    #     sys.stderr.write("NOT Running in a Docker container\n" + os.getcwd() + "\n")
    #     csv_file = './HealthData/garmin_bike.csv'
