diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57b96d0..2af05de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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! diff --git a/cclc_queue/settings.py b/cclc_queue/settings.py index 334f8c8..27ea225 100644 --- a/cclc_queue/settings.py +++ b/cclc_queue/settings.py @@ -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", } } diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8e62b39 --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/poetry.lock b/poetry.lock index b5509bd..b439f5b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -347,6 +347,14 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "mysqlclient" +version = "2.1.1" +description = "Python interface to MySQL" +category = "main" +optional = false +python-versions = ">=3.5" + [[package]] name = "nodeenv" version = "1.7.0" @@ -621,7 +629,7 @@ python-versions = "*" [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "b2006514c463f7975a5d59a547d24d675c7fc1f9c679ee5b28aa0e5f1d5f72eb" +content-hash = "f0aa6eafbe5502d94cf43c6a4dc764c26a669b703a8ed6c0c071020a2632a99c" [metadata.files] appnope = [ @@ -755,6 +763,15 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] +mysqlclient = [ + {file = "mysqlclient-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:c1ed71bd6244993b526113cca3df66428609f90e4652f37eb51c33496d478b37"}, + {file = "mysqlclient-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:c812b67e90082a840efb82a8978369e6e69fc62ce1bda4ca8f3084a9d862308b"}, + {file = "mysqlclient-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:0d1cd3a5a4d28c222fa199002810e8146cffd821410b67851af4cc80aeccd97c"}, + {file = "mysqlclient-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b355c8b5a7d58f2e909acdbb050858390ee1b0e13672ae759e5e784110022994"}, + {file = "mysqlclient-2.1.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:996924f3483fd36a34a5812210c69e71dea5a3d5978d01199b78b7f6d485c855"}, + {file = "mysqlclient-2.1.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:dea88c8d3f5a5d9293dfe7f087c16dd350ceb175f2f6631c9cf4caf3e19b7a96"}, + {file = "mysqlclient-2.1.1.tar.gz", hash = "sha256:828757e419fb11dd6c5ed2576ec92c3efaa93a0f7c39e263586d1ee779c3d782"}, +] nodeenv = [ {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, diff --git a/pyproject.toml b/pyproject.toml index 5fa7764..549d595 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"