Closed lukasmrtvy closed 4 years ago
Hi, This PR breaks existing setup with mysql database. Works fine with v1.12.0-ls47 tag
Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 16, in <module> import MySQLdb as Database ModuleNotFoundError:' No module named 'MySQLdb'
Manual install of mysqlclient through pip throws:
OSError: mysql_config not found
@mlatorre31 can You try it with apk add -U mysql-client
?
@lukasmrtvy doesn't work. However, apk add -U mariadb-connector-c-dev then pip3 install mysqlclient does the trick (with build-dependencies installed again).
The step-by-step that worked for me after version v1.12.0-ls48 first running is this:
docker exec -it healthchecks-conteiner-name /bin/bash
apk add -U mariadb-connector-c-dev
apk add -U gcc libc-dev python3-dev
pip3 install --upgrade pip
pip3 install mysqlclient
exit
docker stop healthchecks-conteiner-name
docker start healthchecks-conteiner-name
The final image size get bigger with the building dependencies included, so for sure there is some room for improvement. But for very short term these steps do the job (at least for me).
We welcome all PR’s though this doesn’t guarantee it will be accepted.
Description:
Benefits of this PR and context:
Working connection to external PostgreSQL and MariaDB
How Has This Been Tested?
Source / References: