Improve timezone docs

This commit is contained in:
Luis Eduardo Jeréz Girón
2024-08-14 23:44:18 -06:00
parent 0f3f145ebe
commit 42046d395b
4 changed files with 10 additions and 9 deletions

View File

@@ -47,7 +47,7 @@ PG Back Web isn't just another backup tool. It's your trusted ally in ensuring t
## Installation
PG Back Web is available as a Docker image. You just need to set 2 environment variables and you're good to go!
PG Back Web is available as a Docker image. You just need to set 3 environment variables and you're good to go!
Here's an example of how you can run PG Back Web with Docker Compose, feel free to adapt it to your needs:
@@ -60,7 +60,7 @@ services:
volumes:
- ./backups:/backups # If you only use S3 destinations, you don't need this volume
environment:
PBW_ENCRYPTION_KEY: "my_secret_key"
PBW_ENCRYPTION_KEY: "my_secret_key" # Change this to a strong key
PBW_POSTGRES_CONN_STRING: "postgresql://postgres:password@postgres:5432/pgbackweb?sslmode=disable"
TZ: "America/Guatemala" # Set your timezone, optional
depends_on:
@@ -92,8 +92,7 @@ You only need to configure the following environment variables:
- `PBW_POSTGRES_CONN_STRING`: The connection string for the PostgreSQL database that will store PG Back Web data.
- `TZ`: Your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List), optional. Default is `UTC`.
Impacts logging, backup filenames and default timezone in the web interface. Can also be a mount point to the host's `/etc/localtime` instead.
- `TZ`: Your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) (optional). Default is `UTC`. This impacts logging, backup filenames and default timezone in the web interface.
## Screenshots

View File

@@ -1,12 +1,13 @@
package backups
import (
"time"
lucide "github.com/eduardolat/gomponents-lucide"
"github.com/eduardolat/pgbackweb/internal/view/web/component"
"github.com/maragudk/gomponents"
"github.com/maragudk/gomponents/components"
"github.com/maragudk/gomponents/html"
"time"
)
func localBackupsHelp() []gomponents.Node {
@@ -63,10 +64,12 @@ func timezoneFilenamesHelp() []gomponents.Node {
serverTimezone := time.Now().Location().String()
return []gomponents.Node{
component.PText(`
This is the time zone in which the cron expression will be evaluated.
`),
html.P(
component.SpanText(`
Only for cron evaluation.
Backup filenames will always use the server timezone (currently
Backup filenames will always use the server timezone (currently
`),
component.BText(serverTimezone),
component.SpanText(")."),

View File

@@ -182,7 +182,6 @@ func createBackupForm(
Label: "Time zone",
Required: true,
Placeholder: "Select a time zone",
HelpText: "The time zone in which the cron expression will be evaluated",
Children: []gomponents.Node{
component.GMap(
staticdata.Timezones,

View File

@@ -124,7 +124,6 @@ func editBackupButton(backup dbgen.BackupsServicePaginateBackupsRow) gomponents.
Label: "Time zone",
Required: true,
Placeholder: "Select a time zone",
HelpText: "The time zone in which the cron expression will be evaluated",
Children: []gomponents.Node{
component.GMap(
staticdata.Timezones,
@@ -140,6 +139,7 @@ func editBackupButton(backup dbgen.BackupsServicePaginateBackupsRow) gomponents.
},
),
},
HelpButtonChildren: timezoneFilenamesHelp(),
}),
component.InputControl(component.InputControlParams{