Tom, I'm interested in this - I have a software architect's goal of getting our Django systems to go to the cloud with Docker, but for Django development, I am eager to clutter up my local box with these tools. I know systemctl quite well, and I have no problem changing postgresql and mysql to be services not started by default. I'm a better postgresql dba than mysql, but I do OK.
On Wed, Nov 7, 2018 at 5:45 AM Tom Forbes <t...@tomforb.es> wrote: > Hey Dan, > > I’ve been working on a project called django_docker_box ( > https://github.com/orf/django-docker-box) that might help with this. > Docker is pretty good at spinning up various databases without needing to > clutter your local machine, spend time configuring authentication or > dealing with issues like this. > > You might find this helps with you. You can run the entire test suite with > it, or you can just spin up a Postgres database and connect to it from your > local machine (docker-compose run postgres-db) with django:django. > > Alternatively you could run: > > docker run -p 5432:5432 -e POSTGRES_PASSWORD=django postgres:9.6 > > And connect to it with postgres:django on localhost:5432 > > Mysql can be done in the same way: > > docker run -p 3306:3306 -e MYSQL_PASSWORD=django mysql:5.7 > > Hope this helps, > > Tom > > > > > On 7 November 2018 at 03:51:47, Dan Davis (dansm...@gmail.com) wrote: > > What about mysql? I have 5.7 installed, and tried to run with root > privileges, which is what worked for postgresql. It still failed quite a > number of times. > > On Tue, Nov 6, 2018 at 7:41 PM charettes <charett...@gmail.com> wrote: > >> Exactly. >> >> Given you should be running tests against a throwaway or at least >> non-critical >> PostgreSQL cluster anyway I don't think requiring superuser privileges is >> an >> issue. >> >> Simon >> >> Le mardi 6 novembre 2018 18:43:47 UTC-5, Dan Davis a écrit : >>> >>> So, a developer using PostgreSQL doesn't need superuser privileges, but >>> you do to run Django's unit tests, because it will test these contributed >>> postgres operations. >>> >>> On Monday, November 5, 2018 at 5:48:20 PM UTC-5, Josh Smeaton wrote: >>>> >>>> I don't think there's a full list of extensions the test suite uses, >>>> but >>>> https://docs.djangoproject.com/en/2.1/ref/contrib/postgres/operations/ >>>> would be close to a full set I'd imagine. >>>> >>>> On Sunday, 4 November 2018 14:43:23 UTC+11, Dan Davis wrote: >>>>> >>>>> So, the contributor guidelines page about unit tests mentions running >>>>> database specific tests: >>>>> >>>>> >>>>> https://docs.djangoproject.com/en/2.1/internals/contributing/writing-code/unit-tests/#testing-other-python-versions-and-database-backends >>>>> >>>>> I am working on ticket 29984, and it seems to me that since the >>>>> TruncDay is attempting to cast to the timezone on the database level, it >>>>> is >>>>> working, and its job is done. So, the fix should be at the backend level, >>>>> and the ticket provides one for Postgres. >>>>> >>>>> Following the unit test advice, I created a settings file. But not >>>>> using my Postgresql admin user. I get the following errors: >>>>> >>>>> psycopg2.ProgrammingError: permission denied to create extension >>>>> "btree_gin" >>>>> HINT: Must be superuser to create this extension. >>>>> >>>>> I'm not going to do that - do you have any list of required extensions? >>>>> >>>> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers (Contributions to Django itself)" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-developers+unsubscr...@googlegroups.com. >> To post to this group, send email to django-developers@googlegroups.com. >> Visit this group at https://groups.google.com/group/django-developers. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-developers/d252a3e0-f8f4-4026-b1eb-9dfd79993618%40googlegroups.com >> <https://groups.google.com/d/msgid/django-developers/d252a3e0-f8f4-4026-b1eb-9dfd79993618%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/CAFzonYYhELA0RRpM07KGsYX08CmM09UjeN8vZRovwfmCUTz_2g%40mail.gmail.com > <https://groups.google.com/d/msgid/django-developers/CAFzonYYhELA0RRpM07KGsYX08CmM09UjeN8vZRovwfmCUTz_2g%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/CAFNZOJMt_w9p2XXaZqyyKPDQycsNAurb9RGea09TfsdpJgNfkQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-developers/CAFNZOJMt_w9p2XXaZqyyKPDQycsNAurb9RGea09TfsdpJgNfkQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFzonYaobTxcuau7kCi5EFAPeg_fvNP4mbNE_S9pyZ6jBnZoSw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.