diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml index 1b015f1..08ea655 100644 --- a/.github/workflows/code-quality.yaml +++ b/.github/workflows/code-quality.yaml @@ -10,10 +10,6 @@ on: permissions: contents: read -env: - DATABASE_URL: ${{ vars.DATABASE_URL }} - OIDC_CONFIG_URL: ${{ vars.OIDC_CONFIG_URL }} - jobs: build: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index e21c0d4..3d77d2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,5 @@ COPY . . RUN pip install . COPY ./app /code/app -COPY ./.env /code/.env CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "5000"] diff --git a/README.md b/README.md index e051ed3..3f21a87 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,10 @@ pip install . pip install -e ".[dev]" ``` -4. To prepare your environment, add a file called `.env` to the `comet-api` directory. Copy and paste the template below and replace the placeholder values with your own: +4. To override default environment variables, add a file called `.env` to the `comet-api` directory and update as needed (optional): ``` -DATABASE_URL=[SOME_URL] # Ex: 'sqlite:///./db.sqlite3' +DATABASE_URL=[SOME_URL] # Ex: 'postgresql://username:password@localhost:5432/database_name' OIDC_CONFIG_URL=[SOME_URL] # Ex: 'https://token.actions.githubusercontent.com/.well-known/openid-configuration' ``` diff --git a/app/config.py b/app/config.py index 6e44c9d..d5f69ed 100644 --- a/app/config.py +++ b/app/config.py @@ -4,8 +4,8 @@ class Settings(BaseSettings): model_config = SettingsConfigDict(env_file=".env") - DATABASE_URL: str - OIDC_CONFIG_URL: str + DATABASE_URL: str = "sqlite:///./db.sqlite3" + OIDC_CONFIG_URL: str | None = None settings = Settings()