Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 19:59
    wgordon17 opened #1922
  • Jan 31 2019 15:53

    browniebroke on pyup-update-django-extensions-2.1.4-to-2.1.5

    (compare)

  • Jan 31 2019 15:53

    browniebroke on master

    Update django-extensions from 2… Merge pull request #1916 from p… (compare)

  • Jan 31 2019 15:53
    browniebroke closed #1916
  • Jan 31 2019 15:52

    browniebroke on pyup-update-flake8-3.6.0-to-3.7.3

    (compare)

  • Jan 31 2019 15:52

    browniebroke on master

    Update flake8 from 3.6.0 to 3.7… Update flake8 from 3.6.0 to 3.7… Merge pull request #1920 from p… (compare)

  • Jan 31 2019 15:52
    browniebroke closed #1920
  • Jan 31 2019 15:49

    browniebroke on pyup-update-pytest-4.1.1-to-4.2.0

    (compare)

  • Jan 31 2019 15:49

    browniebroke on master

    Update pytest from 4.1.1 to 4.2… Update pytest from 4.1.1 to 4.2… Merge pull request #1919 from p… (compare)

  • Jan 31 2019 15:49
    browniebroke closed #1919
  • Jan 31 2019 13:43
    wgordon17 opened #1921
  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.2

    (compare)

  • Jan 31 2019 13:23
    pyup-bot closed #1918
  • Jan 31 2019 13:23
    pyup-bot commented #1918
  • Jan 31 2019 13:23
    pyup-bot opened #1920
  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.3

    Update flake8 from 3.6.0 to 3.7… (compare)

  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.3

    (compare)

  • Jan 31 2019 13:23

    pydanny on pyup-update-flake8-3.6.0-to-3.7.3

    Update flake8 from 3.6.0 to 3.7… (compare)

  • Jan 31 2019 00:40
    pyup-bot opened #1919
  • Jan 31 2019 00:40

    pydanny on pyup-update-pytest-4.1.1-to-4.2.0

    Update pytest from 4.1.1 to 4.2… (compare)

William McVey
@wam_twitter
@Niedzwiedzw Your SSL registration with LetsEncrypt is failing because LetsEncrypt isn't able to contact your site on port 80. That negotiation is all handled by traefik (formerly caddy) and requires LetsEncrypt to be able to query your server on port 80. My guess is that a) your DNS isn't pointing to your droplet's external IP address or you have a firewall configured that might allow 443, but isn't allowing 80.
Chieh Teng Chang
@playma

This question may be not related to cookiecutter-django, but cookiecutter-django use gunicorn as default...
Hope I can find the answer here, thx.

When I use gunicorn, I can not use /api/rest-auth/facebook/
It works well when I use python3 mange.py runserver

Start server
gunicorn config.wsgi -b localhost:8000 --access-logfile - --log-level debug

it returns 200 in option and connection:close

HTTP 200 OK
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "method": null,
    "params": {},
    "data": {
        "name": "Facebook Login",
        "description": "",
        "renders": [
            "application/json",
            "text/html"
        ],
        "parses": [
            "application/json"
        ],
        "actions": {
            "POST": {
                "accessToken": {
                    "type": "string",
                    "required": false,
                    "readOnly": false,
                    "label": "Access token"
                },
                "code": {
                    "type": "string",
                    "required": false,
                    "readOnly": false,
                    "label": "Code"
                }
            }
        }
    }
}

Can any one help me?

Chieh Teng Chang
@playma
I forgot to set the cors in production config...
Tobias S
@Tobias2023
Anyone else get this when starting a project? :
\config\settings\base.py", line 5, in <module>
    import environ
ModuleNotFoundError: No module named 'environ'
Handy Kusuma
@kwhandy
Anyone have experienced to connect then access PostgreSQL data inside Docker with database GUI like DBeaver or TablePlus?
Burhan Khalid
@burhan
Sure Hady, whats your question?
s/Hady/Handy
Kaan Karaca
@h4yfans
Hi everyone! I want to install pip package(s) for my project. The project has Docker setup.
When I run, docker-compose run --rm web pip install package_namecommand, the output says you successfully installed and then I run "docker-compose run --rm web pip freeze" command to for seeing the dependencies. I can't find my installed packages? What I doing wrong?
Peter Coles
@mrcoles
@Tobias2023 that’s one of the deps in the project https://github.com/joke2k/django-environ specified in requirements/base.txt - did you do a pip install of the requirements?
Does anyone know if there’s a good way to log startup errors in a docker setup? I want to be able to catch things that went wrong before Sentry is setup. Would I try to change the LOGGING in settings or is there something in compose/production/django/start I can add?
Burhan Khalid
@burhan
Hi Kaan, when you add —rm, docker will remove the container once the command is finished. Remove that option and try again.
marciks
@marciks
Hey guys! I see that there is a security issue by running nginx along with django cookiecutter.. I needed nginx to also serve static files without the need to setup cdn configs (in the case of using whitenoise)
is there any alternatives to it? I saw that in the past nginx was used.. I also have searched for a template using nginx but with no luck so far
Harry Moreno
@morenoh149
hello
Harry Moreno
@morenoh149
how can I LiveReload and compile sass in the docker container?
Harry Moreno
@morenoh149
I could just edit project.css for now and hope I don't overwrite it
Harry Moreno
@morenoh149
I don't see any package.json in my project. Is using gulp the only way to compile sass?
in other django projects I just use the official sass binary when I'm ready to compile sass
Harry Moreno
@morenoh149
I went with a new django app for my business logic
Nerio Rincon
@n3rio
hi, my django cookiecutter project suddenly stop reading the .envs/ files, of course it wasn't suddenly, i mean i must broke it some how, but i can not remember what and for the life of me, i don't know where to start looking, any ideas?? i mean any idea will be useful, the error i'm getting just after building is: django.core.exceptions.ImproperlyConfigured: Set the DATABASE_URL environment variable, also i got a message like that but for USE_DOCKER variable, both setup on the envs files
Harry Moreno
@morenoh149
@n3rio I just set the vars using set you could try making a simple bash script you source until you figure out how to fix the .env loading
btw did you choose docker in the wizard during setup?
Nerio Rincon
@n3rio
thanks @morenoh149 , will try that, and yes i did, that what seems odd, it was working, but i think someone on the team or even me, mess with the configs files, because things don't stop working just because.
Harry Moreno
@morenoh149
Failed to load resource: the server responded with a status of 404 (Not Found) output.83a0993870e8.js:1 anyone know how to fix this on Heroku?
fluid217
@fluid217
To achieve automated backups using the docker config using docker-compose -f local.yml exec postgres backup & docker-compose -f production.yml run --rm awscli upload. Would it be best to have those commands in a script and execute them via cron on the docker host (EC2 on AWS)? Any other suggested methods ?
Harry Moreno
@morenoh149
there are automatic backups in this project?
@fluid217 that sounds reasonable. It depends on how you orchestrate your docker
fluid217
@fluid217
Thanks @morenoh149. Always keen to hear what other people are doing, or what's considered best practice. Keeping the scripts and crontab in my codebase and installing them on deployment is my current plan. Always good to know if more experienced people think this is a good or bad idea.
Carl Brand
@brandc87
Does anyone know how you would go about scaling an app using digitalocean? I currently use cookiecutter with docker and DigitalOcean, deployment with docker-machine build / up when I want to release updates. If you needed to scale an app would docker swarm be enough or DigitalOcean load balancers?
Harry Moreno
@morenoh149
@brandc87 yes, in general you want load balancers routing stateless requests to any of your public facing virtual machines (your Django's)
YoomamaFTW
@YoomamaFTW
Hi, I’ve got a question about updating a production docker cookiecutter-django. How would I update the containers wih
without taking down the website?
Alejandro Duque Correa
@aleducode
hi @YoomamaFTW i normally use '$ docker-compose build django
$ docker-compose up --no-deps -d django ' <django> is the name of my service in compose
marciks
@marciks
heya guys, is there any version of django cookie cutter out there using nginx?
I see from early discussions that is was removed mainly because of nginx gen mounting volumes on docker socket
YoomamaFTW
@YoomamaFTW
@aleducode Thank you! I believe django is the default as well right?
Alejandro Duque Correa
@aleducode
yep
YoomamaFTW
@YoomamaFTW
awesome thanks again!
I’ve also wanted to switch to nginx since I’ve used it more and tested it more @marciks . I found this online if you want to implement https://www.minvolai.com/swapping-out-caddy-for-nginx-in-cookiecutter-django/
marciks
@marciks
Hey @YoomamaFTW thanks for your suggestion.. i have made a fork and removed traefik then did put a custom nginx docker there, but still not sure if the modifications I made are
.. are the correct ones
Axel
@Micromegass
@YoomamaFTW Did that work for you?
YoomamaFTW
@YoomamaFTW
No. Haven’t gotten around to it due to teachers swamping with homework and midterms. Will update here in a couple days with any progress or any issues. I’ve looked at the article and the issue that marciks brought up around nginx proxy.... which I’m curious why proxy in a dockerfied cookiecutter project.
Axel
@Micromegass
Ok good luck with that. Let me know about your process in case you implement it. I am trying right now and am struggling quite a bit :)
El 李天宝
@elcolie

$ docker-compose -f production.yml ps

   Name                     Command               State                     Ports

ass_awscli_1 /bin/sh Exit 0
ass_celerybeat_1 /entrypoint /start-celerybeat Exit 1
ass_celeryworker_1 /entrypoint /start-celeryw ... Up
ass_django_1 /entrypoint /start Up
ass_flower_1 /entrypoint /start-flower Up 0.0.0.0:5555->5555/tcp
ass_redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
ass_traefik_1 /entrypoint.sh traefik Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp

Exit0 and Exit1
Are they normal?
version: '3'

volumes:
  production_postgres_data: {}
  production_postgres_data_backups: {}
  production_traefik: {}

services:
  django: &django
    build:
      context: .
      dockerfile: ./compose/production/django/Dockerfile
    image: ass_production_django
    depends_on:
#      - postgres
      - redis
    env_file:
      - ./.envs/.production/.django
      - ./.envs/.production/.postgres
    command: /start

#  postgres:
#    build:
#      context: .
#      dockerfile: ./compose/production/postgres/Dockerfile
#    image: ass_production_postgres
#    volumes:
#      - production_postgres_data:/var/lib/postgresql/data
#      - production_postgres_data_backups:/backups
#    env_file:
#      - ./.envs/.production/.postgres

  traefik:
    build:
      context: .
      dockerfile: ./compose/production/traefik/Dockerfile
    image: ass_production_traefik
    depends_on:
      - django
    volumes:
      - production_traefik:/etc/traefik/acme
    ports:
      - "0.0.0.0:80:80"
      - "0.0.0.0:443:443"

  redis:
    image: redis:5.0

  celeryworker:
    <<: *django
    image: ass_production_celeryworker
    command: /start-celeryworker

  celerybeat:
    <<: *django
    image: ass_production_celerybeat
    command: /start-celerybeat

  flower:
    <<: *django
    image: ass_production_flower
    ports:
      - "5555:5555"
    command: /start-flower


  awscli:
    build:
      context: .
      dockerfile: ./compose/production/aws/Dockerfile
    env_file:
      - ./.envs/.production/.django
    volumes:
      - production_postgres_data_backups:/backups
Bruno Alla
@browniebroke
You commented out postgres? What DB is your system using?