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

chore: Add mysql database #11

Closed
wants to merge 8 commits into from
Closed

chore: Add mysql database #11

wants to merge 8 commits into from

Conversation

hugotiburtino
Copy link
Member

@hugotiburtino hugotiburtino commented Jun 7, 2024

The idea is to simulate the use of our mysql database for itslearning lti resources.

@@ -0,0 +1,5 @@
import mysql from 'mysql2/promise'

export const connection = await mysql.createConnection('mysql://root:secret@localhost/itslearning')
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
export const connection = await mysql.createConnection('mysql://root:secret@localhost/itslearning')
export const connection = await mysql.createConnection('mysql://root:secret@localhost/serlo')

See serlo/api.serlo.org#1665

@@ -0,0 +1,57 @@
-- MySQL dump 10.13 Distrib 8.4.0, for Linux (x86_64)
Copy link
Member Author

Choose a reason for hiding this comment

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

Since we are using the serlo database , this should be deleted
serlo/api.serlo.org#1665

Comment on lines +2 to +9
mysql:
image: mysql:8
ports:
- '3306:3306'
environment:
- MYSQL_ROOT_PASSWORD=secret
volumes:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
mysql:
image: mysql:8
ports:
- '3306:3306'
environment:
- MYSQL_ROOT_PASSWORD=secret
volumes:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
mysql:
image: eu.gcr.io/serlo-shared/serlo-mysql-database:latest
platform: linux/x86_64
pull_policy: always
ports:
- '3306:3306'

@hugotiburtino
Copy link
Member Author

@hejtful maybe you want to see my suggestions and adapt this code to the new needs.

@LarsTheGlidingSquirrel
Copy link
Member

Thank you Hugo for the suggestions! I'll close this PR because it drifted apart from main but we will incorporate them into main.

@kulla kulla deleted the database branch July 18, 2024 18:15
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.

2 participants