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

Add option for using docker volume for data persistence #471

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions fief/cli/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def quickstart(
False,
help="Whether the Fief server will be served over SSL. For local development, it'll likely be false.",
),
use_docker_volume: bool = typer.Option(
True,
help="Store Fief server data in a Docker volume to ensure data persistence (ignored without `--docker`).",
),
):
"""Generate secrets and environment variables to help users getting started quickly."""

Expand Down Expand Up @@ -88,6 +92,8 @@ def quickstart(
],
"ghcr.io/fief-dev/fief:latest",
]
if use_docker_volume:
parts.append("-v 'fief_data:/data'")
typer.echo(" \\\n ".join(parts))
else:
for name, value in environment_variables.items():
Expand Down