{"id":23799449,"url":"https://github.com/singularit-de/django-test","last_synced_at":"2025-08-23T14:15:19.086Z","repository":{"id":142926759,"uuid":"611775793","full_name":"singularit-de/django-test","owner":"singularit-de","description":"Django pyton test image with all database installs","archived":false,"fork":false,"pushed_at":"2025-08-21T22:02:34.000Z","size":901,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-21T23:45:04.723Z","etag":null,"topics":["django","django-rest-framework","docker","docker-image","github-actions","gitlab-ci","python","python3","testing"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/orbisk/django-test","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singularit-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-09T14:20:36.000Z","updated_at":"2025-08-21T22:02:31.000Z","dependencies_parsed_at":"2023-11-30T12:28:01.733Z","dependency_job_id":"4d375d58-0800-4067-9475-6d0c0a2e8fb4","html_url":"https://github.com/singularit-de/django-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/singularit-de/django-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularit-de%2Fdjango-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularit-de%2Fdjango-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularit-de%2Fdjango-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularit-de%2Fdjango-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singularit-de","download_url":"https://codeload.github.com/singularit-de/django-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singularit-de%2Fdjango-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271751926,"owners_count":24814707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-rest-framework","docker","docker-image","github-actions","gitlab-ci","python","python3","testing"],"created_at":"2025-01-01T21:16:36.505Z","updated_at":"2025-08-23T14:15:19.054Z","avatar_url":"https://github.com/singularit-de.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.singular-it.de/\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\"  srcset=\"./documents/singular_it_dark.png\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./documents/singular_it_light.png\"\u003e\n      \u003cimg width=\"500px\" alt=\"singularIT Logo\" src=\"./documents/singular_it_light.png\"\u003e\n    \u003c/picture\u003e    \n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.singular-it.de/\"\u003eWebsite\u003c/a\u003e |\n  \u003ca href=\"https://blog.singular-it.de/\"\u003eBlog\u003c/a\u003e |\n  \u003ca href=\"https://www.singular-it.de/team\"\u003eTeam\u003c/a\u003e\n\u003c/p\u003e\n\n## Why?\n\nThe official Python images, which are widely used for software development, may not come with all the necessary\ndependencies to run Django tests out of the box. This can put a strain on developers who need to set up a CI pipeline,\nparticularly when trying to use MySQL, MariaDB, or Postgres as services. To work around this issue, developers need to\nbe aware that they may need to install additional dependencies or configure their CI pipeline in a way that allows these\ndependencies to be installed at runtime. This can add extra steps to the development process and may require additional\ntroubleshooting to ensure that everything is working correctly.\n\nThis image is designed to provide you with a convenient and efficient way to work with MySQL databases in CI. The image\ncomes with a preinstalled MySQL config, which means you can get up and running with your database quickly and easily. In\naddition, we've included all the necessary clients, such as mysql-client, to ensure you have everything you need to get\nstarted.\n\n## Features\n\n- 🐍 Python 3.7 - 3.13\n- ⚡️ [`uv`](https://github.com/astral-sh/uv) preinstalled\n- 🏗️ Build dependencies preinstalled\n- 🔄 CI/CD ready\n- 🐘 Postgres support\n- 🐬 MariaDB support\n- 🐬 MySQL support\n- 🏢 MSSQL support (beta)\n\n\n[//]: # (out of the box mysql support)\n\n## Compatibility\n\n- 🟢 Supported/Tested\n- 🟡 Unknown/Untested\n- 🟠 Beta/Experimental (please share your experiences)\n- 🔴 Currently not Supported (open an Issue or Pull request if needed)\n\n| Python version |                        | uv preinstalled |\n|----------------|------------------------|:----------------|\n| `^3.13.0`      | 🟢                     | 🟢 (`^3.13.0`)  |\n| `^3.12.4`      | 🟢                     | 🟢 (`^3.12.7`)  |\n| `^3.11.2`      | 🟢                     | 🟢 (`^3.11.10`) |\n| `^3.10.10`     | 🟢                     | 🟢 (`^3.10.15`) |\n| `^3.9.16`      | 🟢                     | 🟢 (`^3.9.20`)  |\n| `^3.8.16`      | 🟢                     | 🟢 (`^3.8.20`)  |\n| `^3.7.16`      | 🟡 ([see](#python-37)) | 🔴              |\n| `^2.x`         | 🔴                     | 🔴              |\n\n| MySQL*️⃣ |    |\n|----------|----|\n| `^9.0.0` | 🟢 |\n| `^8.0.0` | 🟢 |\n| `\u003c=5.7`  | 🟡 |\n\n| MariaDB*️⃣ |    |\n|------------|----|\n| `^11.0.0`  | 🟢 |\n| `^10.7.8`  | 🟢 |\n| `\u003c10.7.8`  | 🟡 |\n\n| Postgres |    |\n|----------|----|\n| `^17.0`  | 🟢 |\n| `^16.0`  | 🟢 |\n| `^15.2`  | 🟢 |\n| `\u003c15.2`  | 🟡 |\n\n| MSSQL ([see](#mssql-beta)) |    |\n|----------------------------|----|\n| `\u003e=2022`                   | 🟠 |\n| `^2019-CU23-ubuntu-20.04`  | 🟢 |\n| `\u003c=2017`                   | 🟠 |\n\n*️⃣ Additional step required see: [Error creating the test database](#error-creating-the-test-database)\n\n## Common issues\n\n### Error creating the test database\n\n`Got an error creating the test database: (1044, \"1044 (42000): Access denied for user '\u003ctest_user\u003e'@'%' to database 'test_\u003cmy_db\u003e'\", '42000')`\n\nThe MYSQL user is only granted permissions for the MYSQL_DB, which means that Django is unable to create a test\ndatabase.\nTo use MySQL and MariaDB with a non-root user, you need to grant privileges to your test user.\n\n`echo \"GRANT ALL on *.* to '$MYSQL_USER';\"| mysql -u root --password=\"$MYSQL_ROOT_PASSWORD\" -h \u003chost\u003e -p \u003cport\u003e`\n\n## CI Examples\n\n### GitLab CI\n\n```yml\nvariables:\n  MARIADB_USER: test_user\n  MARIADB_PASSWORD: password\n  MARIADB_ROOT_PASSWORD: root@password\n  MARIADB_DATABASE: my_db\n\ndjango-tests:\n  image: orbisk/django-test:3.11\n  stage: test\n  services:\n    - name: mariadb:10\n      alias: maria\n  script:\n    - pip3 install -r requirements.txt\n    # The MYSQL user only gets permissions for MYSQL_DB, so Django can't create a test database.\n    - echo \"GRANT ALL on *.* to '$MARIADB_USER';\"| mysql -u root --password=\"$MARIADB_ROOT_PASSWORD\" -h maria\n    - python3 manage.py test\n\n```\n\n## Feedback\n\nIf you have any problems with or questions about this image, please open an issue on GitHub.\n\n## MSSQL Beta\n\n⚠️ The MSSQL support is currently in beta. If you have any problems with or questions about this image, please open an\nissue on GitHub.\n\nMSSQL is currently only supported/tested with the following versions:\n\n- [`^mssql-server-linux:2019-CU23-ubuntu-20.04`](https://hub.docker.com/_/microsoft-mssql-server)\n- [`mssql-django===1.3`](https://pypi.org/project/mssql-django/)\n- [`Microsoft ODBC Driver 17 for SQL Server` \u0026\n  `Microsoft ODBC Driver 18 for SQL Server`](https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16\u0026tabs=debian18-install%2Calpine17-install%2Cdebian8-install%2Credhat7-13-install%2Crhel7-offline) ('\n  Microsoft ODBC Driver 18 for SQL Server' does currently not work with mssql as ci service with self-signed ssl certs.\n  If you have any solution, feel free to open an Issue or PR)\n\n## Limitations\n\n### Python 3.7\n\nPython 3.7 is not covered by our CI/CD tests anymore. This means that we can't guarantee that the image will work as\nexpected with Python 3.7. The reason is that packages like `mssql-django` dropped support for Python 3.7, so we can't\ntest it anymore. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingularit-de%2Fdjango-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingularit-de%2Fdjango-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingularit-de%2Fdjango-test/lists"}