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

feat(provisioners): added default mysql provisioner #18

Merged

Conversation

astromechza
Copy link
Member

@astromechza astromechza commented Jun 27, 2024

This copies the existing postgres provisioner and adapts it for mysql.

This was tested with a score file that looks like:

apiVersion: score.dev/v1b1
metadata:
    name: demo-app
containers:
    main:
        image: ghcr.io/astromechza/demo-app:v0.6.1
        variables:
            OVERRIDE_MYSQL: ${resources.db.username}:${resources.db.password}@tcp(${resources.db.host}:${resources.db.port})/${resources.db.name}
service:
    ports:
        web:
            port: 8080
resources:
    db:
        type: mysql

Which correctly verified that the database DSN for mysql was valid and connected ok.

Unlike score-compose, this provisioner uses a single database per instance model - which is generally ok for the moment as a proof of concept and providing some basic support.

Fixes #13 .

@astromechza astromechza linked an issue Jun 27, 2024 that may be closed by this pull request
@astromechza astromechza force-pushed the 13-feature-request-add-mysql-in-the-default-provisioners branch from 8283397 to 3390159 Compare June 27, 2024 22:20
Copy link
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@astromechza astromechza merged commit 725f628 into main Jun 28, 2024
3 checks passed
@astromechza astromechza deleted the 13-feature-request-add-mysql-in-the-default-provisioners branch June 28, 2024 16:48
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.

[feature request] Add mysql in the default provisioners
2 participants