Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default username and password for admin pocket base docker #31

Open
dviramontes opened this issue Feb 9, 2025 · 3 comments · May be fixed by #32
Open

Default username and password for admin pocket base docker #31

dviramontes opened this issue Feb 9, 2025 · 3 comments · May be fixed by #32

Comments

@dviramontes
Copy link

dviramontes commented Feb 9, 2025

Hi, would you be open to a contribution to pocketbase and therefore pocketbase-docker
that would allow a user to setup the default email and password for the container in the following way?

services:
  pocketbase:
    image: ghcr.io/muchobien/pocketbase:latest
    environment:
      - POCKETBASE_ADMIN_EMAIL=${POCKETBASE_ADMIN_EMAIL}
      - POCKETBASE_ADMIN_PASSWORD=${POCKETBASE_ADMIN_PASSWORD}

Much like in postgres container you can do

services:
  db:
    image: postgres:15
    environment:
      - POSTGRES_USER=${DB_USER}
      - POSTGRES_PASSWORD=${DB_PASSWORD}

which eases friction during local development. Lmk what you think and thanks for creating an amazing project 💯

@dviramontes dviramontes changed the title setup default username and password for admin pocket base docker Default username and password for admin pocket base docker Feb 9, 2025
@KROSF
Copy link
Member

KROSF commented Feb 10, 2025

maybe creating a custom init to call

./pocketbase superuser create EMAIL PASS

before starting the container

if you you want to create the PR i'm open to merge it

@dviramontes
Copy link
Author

do you mean a custom init call on the container or back at pocketbase repo?

@KROSF
Copy link
Member

KROSF commented Feb 18, 2025

a custom init on the container would be ideal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants