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 support for postgres #60

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Add support for postgres #60

merged 1 commit into from
Dec 13, 2024

Conversation

trey-ivy
Copy link
Collaborator

adds support for using a postgres backend.

set datasource-driver to pgx and pass the connection string in the datasource-url and you're all set

example usage in launch.json file for local debugging:

{
    
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Backend Debug",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "/home/trey/src/bb-portal/cmd/bb_portal/main.go",
            "cwd": "/home/trey/src/bb-portal/",
            "env": {
                "GRPC_GO_LOG_VERBOSITY_LEVEL": "99",
                "GRPC_GO_LOG_SEVERITY_LEVEL": "info",
            },
            "args": [
                "--config-file=/home/trey/src/bb-portal/config/portal.jsonnet",
                "--bep-folder=/data/bep-files",
                "--datasource-driver=pgx",
                "--datasource-url=postgresql://postgres_user:postgres_password@localhost:5432/bbportal",
                "--blob-archive-folder=/data/blob-archive",
            ]
        },
        {
            "name": "Frontend Debug",
            "type": "node",
            "request": "launch",
            "cwd": "/home/trey/src/bb-portal/frontend",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
                "run",
                "dev"
            ],
        },
    ],
    "compounds": [
        {
            "name": "bb-portal debug(frontend/backend)",
            "configurations": [
                "Backend Debug",
                "Frontend Debug"
            ],
            "stopAll": true
        }
    ]
}

@trey-ivy trey-ivy requested a review from mortenmj December 11, 2024 13:50
@trey-ivy trey-ivy merged commit 5b83d58 into main Dec 13, 2024
2 checks passed
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 this pull request may close these issues.

1 participant