Update env and compose examples, fix distance formatting

Improved comments and guidance in .env.example for DB variables, clarified volume path in docker-compose.yml.example #336
Fixed formatDistanceRaw usage in UserGoalsStatsComponent.vue by adding the missing argument.
This commit is contained in:
João Vitória Silva
2025-09-18 10:24:40 +01:00
parent aa16d2d60b
commit 5390c8a30a
3 changed files with 8 additions and 6 deletions

View File

@@ -2,15 +2,17 @@
# These are just the variable you have to set to be up and running.
# There is many more variable you could set. Check them out here: https://docs.endurain.com/getting-started/advanced-started/#supported-environment-variables
DB_PASSWORD=changeme
POSTGRES_PASSWORD=changeme
DB_PASSWORD=changeme # Set a strong password here. Check if there are no trailing whitespaces in the beginning and end. Must be the same as POSTGRES_PASSWORD
POSTGRES_PASSWORD=changeme # Must be the same as DB_PASSWORD
SECRET_KEY=changeme
FERNET_KEY=changeme
TZ=Europe/Lisbon
ENDURAIN_HOST=https://endurain.example.com
BEHIND_PROXY=true
POSTGRES_DB=endurain
POSTGRES_USER=endurain
POSTGRES_DB=endurain # If you change this, you also have to change DB_DATABASE
# DB_DATABASE=endurain # Uncomment and set it to the same as POSTGRES_DB if you change it
POSTGRES_USER=endurain # If you change this, you also have to change DB_USER
# DB_USER=endurain # Uncomment and set it to the same as POSTGRES_USER if you change it
PGDATA=/var/lib/postgresql/data/pgdata
# Email configuration (for password reset functionality)

View File

@@ -27,5 +27,5 @@ services:
timeout: 5s
retries: 5
volumes:
- /opt/endurain/postgres:/var/lib/postgresql/data
- <local_path>/endurain/postgres:/var/lib/postgresql/data
restart: unless-stopped

View File

@@ -43,7 +43,7 @@
}}{{ goal.goal_activities_number }} {{ $t('userGoalsStatsComponent.activities') }}</span
>
<span v-if="goal.goal_type === 3"
>{{ formatDistanceRaw(t, goal.total_distance, authStore.user.units)
>{{ formatDistanceRaw(t, goal.total_distance, authStore.user.units, false)
}}{{ $t('generalItems.ofWithSpaces')
}}{{ formatDistanceRaw(t, goal.goal_distance, authStore.user.units) }}</span
>