Skip to content

Migrate to MySQL #38

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
15 changes: 14 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ poetry run pre-commit install

This ensures the correct checks are run when you go to make a commit.

### 4. Finished
### 4. Setting up Docker

If you are running Windows you will first need to install WSL. To install WSL
follow Microsoft's guide [here](https://learn.microsoft.com/en-us/windows/wsl/install).

To install Docker navigate [here](https://www.docker.com/products/docker-desktop/) to install Docker Desktop

Run the Docker Desktop installer to finish the installation.

To run docker navigate to the project directory and run `docker compose up -d` to start the required docker services.

To stop the running docker services run `docker compose stop` in the project.

### 5. Finished

You are now all set up and ready to develop!
8 changes: 6 additions & 2 deletions cclc_queue/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@

DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"ENGINE": "django.db.backends.mysql",
"NAME": "cclc-queue",
"USER": "root",
"PASSWORD": "password",
"HOST": "127.0.0.1",
"PORT": "3306",
}
}

Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.8"
services:
mysql:
container_name: cclc_queue_mysql
image: mysql:8
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: cclc-queue
19 changes: 18 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Django = "^4.0.1"
django-crispy-forms = "^1.14.0"
psutil = "^5.9.2"
crispy-bootstrap5 = "^0.7"
mysqlclient = "^2.1.1"

[tool.poetry.dev-dependencies]
black = "^22.3.0"
Expand Down