I have django project and make managment command for django. This command delete some objects from db. So If I run it manually "docker-compose exec web python manage.py mycommand" it works fine, but when I try add task into cron using crontab (cron located in django container): */1 * * * * path/to/python path/to/manage.py mycommand ..
Category : django

Helping my wife on a project for one of her grad classes. Basically, she has to present on and demo containers and some cloud technology for a final. Helped build a super barebones Django application where the user can take a snapshot of themselves, submit it to Rekognition, and it responds with a drink recommendation ..

Helping my wife on a project for one of her grad classes. Basically, she has to present on and demo containers and some cloud technology for a final. Helped build a super barebones Django application where the user can take a snapshot of themselves, submit it to Rekognition, and it responds with a drink recommendation ..
I have a problem with my Docker. In my dev version of Docker it’s working but when I’ve created prod version it says that Pillow is not installed. I’ve been searching for solution since yesterday, but none of given is working for me. Thanks in advance. When I’m running flake8 there are a strange errors ..
I am using geopandas in my python code. When i run my code using docker-compose up, i am getting the following error ModuleNotFoundError: No module named ‘geopandas’ requirements.txt is as follows: codegen==1.0 Django==3.1.1 django-cors-headers==3.5.0 djangorestframework==3.12.2 django-rest-multiple-models==2.1.3 django-enumfield==2.0.2 django-tinymce==3.1.0 django-geo==0.8 geopandas==0.8.2 gunicorn==20.0.4 mysqlclient==2.0.1 patterns==0.3 pandas==1.2.4 pytz==2020.1 requests==2.25.1 timezones==2.0.8 six==1.15.0 sqlparse==0.3.1 waitress==1.4.4 whitenoise==5.2.0 when i installed geopandas ..
I’m trying to upload my project to docker hub. I followed this tutorial https://docs.docker.com/compose/django/. I use docker-compose and it works great for me, but I cannot upload it to the docker hub. I am using docker-compose push and it only pushes a project image without a base. I would like the base to also go ..
I am new to Docker, currently I am trying to deploy my app in a container. I have made 2 containers one for the DB and one for the app. But when I am trying to run my docker-compose file the app container exists with exit code 252. Here are the logs – web_1 | ..
I have been using Django to connect to MySQL on my local computer and I have been using the following method to connect: run pip install mysqlclient and update the requirements.txt file appropriately. update the database connection in settings.py to something like this: ‘ENGINE’: ‘django.db.backends.mysql’, ‘NAME’: ……, ‘USER’: ……, A bit of a problem arose ..
Windows 10 Dockerfile:- FROM python:3.8 ENV PYTHONUNBUFFERED 1 COPY ./requirements.txt /requirements.txt RUN apt-get install default-libmysqlclient-dev RUN pip install -r requirements.txt RUN pip install mysqlclient RUN mkdir /app WORKDIR /app COPY ./app /app docker-compose.yml :- version: "3" services: app: build: context: . ports: – "8000:8000" volumes: – ./app:/app – /tmp/app/mysqld:/run/mysqld command: > sh -c "python manage.py ..
I am getting the following error: (2002, "Can’t connect to MySQL server on ‘db’ (115)"), when trying to use the Django admin dashboard (or running migrations or anything that connects to the DB). This is my docker-compose.yml: version: "3.9" services: db: image: mariadb restart: always volumes: – ./data/db:/var/lib/mysql env_file: – .env ports: – 3306:3306 healthcheck: ..