diff --git a/compose.yml b/compose.yml index 0dacfac..91cb65d 100644 --- a/compose.yml +++ b/compose.yml @@ -9,6 +9,11 @@ services: volumes: - ./pb/data:/pb/pb_data restart: no + environment: + # These are only needed at first start. These are the values used to login to the admin panel. + # If left empty the email will be set to test@example.com and the password to 1234567890 + #- EMAIL= + #- PASSWORD= bot: depends_on: pocketbase: diff --git a/pb/migrations/migration.js b/pb/migrations/initialize.js similarity index 98% rename from pb/migrations/migration.js rename to pb/migrations/initialize.js index a655b66..5ce9b12 100644 --- a/pb/migrations/migration.js +++ b/pb/migrations/initialize.js @@ -5,6 +5,9 @@ migrate(app => { let record = new Record(superusers) + const email = process.env.EMAIL ?? 'text@example.com' + const password = process.env.PASSWORD ?? '1234567890' + // This should be communicated to the user, or be set by the user. record.set("email", "test@example.com") record.set("password", "1234567890")